[英]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.