[英]Android listview in scrollview, listview scroll when scrollview scrolled specific position
I need Scroll Listview inside Scrollview. 我需要Scrollview中的Scroll Listview。
Scrollview has two child view, Relative layout and Listview Scrollview有两个子视图,相对布局和Listview
And listview is using naver's PullToRefresh library . listview使用naver的PullToRefresh库 。
I want two function 我要两个功能
I have example screenshot 我有示例屏幕截图
https://www.dropbox.com/s/8renmrmw5n8g5em/example.png?dl=0 https://www.dropbox.com/s/8renmrmw5n8g5em/example.png?dl=0
It actually using in project, protected by NDA. 它实际上在受NDA保护的项目中使用。 that I censored it. 我审查了它。
I had try to requestDisallowInterceptTouchEvent(), it not for me. 我曾尝试requestDisallowInterceptTouchEvent(),但对我来说不行。
My layout xml. 我的布局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>
Thank you for your kind cooperation. 感谢您的友好合作。
solved. 解决了。
I give up to use scroll view. 我放弃使用滚动视图。
I using onScrollListener on Listview, change menu's marginTop realtime. 我在Listview上使用onScrollListener,实时更改菜单的marginTop。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.