[英]Android listview in scrollview, listview scroll when scrollview scrolled specific position
我需要Scrollview中的Scroll Listview。
Scrollview有两个子视图,相对布局和Listview
listview使用naver的PullToRefresh库 。
我要两个功能
我有示例屏幕截图
https://www.dropbox.com/s/8renmrmw5n8g5em/example.png?dl=0
它实际上在受NDA保护的项目中使用。 我审查了它。
我曾尝试requestDisallowInterceptTouchEvent(),但对我来说不行。
我的布局xml。
<ScrollView
android:id="@+id/main_doc_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none"
android:fillViewport="true">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include
layout="@layout/main_page_top_scroll_items"
android:layout_height="wrap_content"
android:layout_width="match_parent"/>
<com.handmark.pulltorefresh.library.PullToRefreshListView
xmlns:ptr="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_doc_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:cacheColorHint="#00000000"
android:divider="#00FF0000"
android:dividerHeight="0dp"
android:fadingEdge="none"
android:fastScrollEnabled="false"
android:footerDividersEnabled="false"
android:headerDividersEnabled="false"
android:smoothScrollbar="true"
android:scrollbars="none"
ptr:ptrFriction="3.0"
ptr:ptrSmoothScrollDuration="400" />
</LinearLayout>
</ScrollView>
感谢您的友好合作。
解决了。
我放弃使用滚动视图。
我在Listview上使用onScrollListener,实时更改菜单的marginTop。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.