【发布时间】:2016-05-23 07:00:36
【问题描述】:
我有 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 水平滚动和焦点移动到寻呼机。但是如果我将 listView_feed 移到 SwipeRefreshLayout 之外,那么每个 listView_feed 子项都可以水平滚动。
【问题讨论】:
-
尝试将 SwipeRefreshLayout 设为根元素。
-
不工作同样的问题@Malith Lakshan
标签: android horizontal-scrolling swiperefreshlayout