我在viewPager里面有2个片段。在fragment1.xml里面
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_color"
android:focusable="false"> <android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/listView_feed"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animationCache="true"
android:clipToPadding="false"
android:divider="@color/transparent"
android:dividerHeight="2dp"
android:paddingBottom="12dp"
android:paddingTop="12dp"
android:scrollbars="none"
android:focusable="true"
android:scrollingCache="false"
android:smoothScrollbar="true" /></android.support.v4.widget.SwipeRefreshLayout></RelativeLayout>
在listView_feed中,listView_feed每行内部还有另一个horizontal_listview,但在SwipeRefreshLayout内部添加时,它不会允许horizontal_listview水平滚动并将焦点移动到寻呼机。但是如果我在SwipeRefreshLayout外移动listView_feed,那么每个listView_feed子节点都可以水平滚动。
答案 0 :(得分:0)
谢谢谁试过看我的问题。最后我通过使用它找到了一个好library我能够达到我的要求。但它与SwipeRefershLayout不同。标题清晰,而不是Listview,但效果很好。