【问题标题】:SwipeRefreshLayout not allowing listview row item horizontal scrollingSwipeRefreshLayout 不允许 listview 行项目水平滚动
【发布时间】: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 内都有另一个 Horizo​​ntal_listview,但是在 SwipeRefreshLayout 内添加时,它不允许 Horizo​​ntal_listview 水平滚动和焦点移动到寻呼机。但是如果我将 listView_feed 移到 SwipeRefreshLayout 之外,那么每个 listView_feed 子项都可以水平滚动。

【问题讨论】:

  • 尝试将 SwipeRefreshLayout 设为根元素。
  • 不工作同样的问题@Malith Lakshan

标签: android horizontal-scrolling swiperefreshlayout


【解决方案1】:

感谢您尝试并看到我的问题。最后我找到了一个很好的library,通过使用它我能够达到我的要求。但它与 SwipeRefershLayout 不同。它在标题中令人耳目一新,而不是在 Listview 上,但效果很好。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-26
    • 2014-05-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多