Java 安卓系统:滑动刷新卡在带有视图寻呼机的回收器视图上
这是我的XML代码Java 安卓系统:滑动刷新卡在带有视图寻呼机的回收器视图上,java,android,xml,android-viewpager,swiperefreshlayout,Java,Android,Xml,Android Viewpager,Swiperefreshlayout,这是我的XML代码 <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@+id/flipper"> <android.support.v4.widget.SwipeRefreshLayout android:id="@+id/refreshLayout"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/flipper">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/refreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/headerLayout"
android:background="@color/background_color"
android:visibility="visible">
<android.support.v7.widget.RecyclerView
android:id="@+id/list_appointment"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</android.support.v4.widget.SwipeRefreshLayout>
<RelativeLayout
android:id="@+id/emptyView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone">
<ImageView
android:id="@+id/empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:src="@drawable/ic_event_note"
android:textAppearance="?android:textAppearanceMedium" />
</RelativeLayout>
</FrameLayout>
RecyclerView
s适配器支持两种类型的视图,一种是CardView
,另一种是ViewPager
当我滑动以刷新时,循环刷新图标冻结在ViewPager
的顶部。在我再次点击刷新图标后,会调用onrefresh方法。是否有解决此问题的方法