【发布时间】:2015-01-11 09:24:14
【问题描述】:
我有一个ViewPager 用于主布局,有 3 个片段作为页面,其中 2 个在其中有一个 GrideView。
主页代码:
<android.support.v4.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="@+id/main_pager"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v4.view.ViewPager>
</android.support.v4.widget.SwipeRefreshLayout>
第一个片段的代码:
<GridView
android:id="@+id/firstCategoryGridView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:numColumns="1"
android:stretchMode="columnWidth"
android:scrollbars="none"
android:listSelector="#00000000">
</GridView>
网格视图充满了项目。在列表中间,当我向上滚动时,SwipeRefreshLayout 在列表到达顶部之前被触发。 我该如何解决这个问题?
【问题讨论】:
标签: android gridview android-viewpager swiperefreshlayout