【发布时间】:2019-06-19 17:20:56
【问题描述】:
我在RelativeLayout 下有RecyclerView 和ProgressBar。 ProgressBar 显示在中心,直到数据加载到 RecyclerView。我想在RecyclerView 的顶部和下方实现ViewPager,以便可以轻松滚动整个视图。
这是我到目前为止所做的:
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/progress2"
android:layout_centerInParent="true"/>
<android.support.v4.widget.SwipeRefreshLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/refresh">
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/recycle"/>
</android.support.v4.widget.SwipeRefreshLayout>
</RelativeLayout>
请告诉我如何制作所需的布局。任何帮助将不胜感激。
谢谢
【问题讨论】:
标签: android android-recyclerview android-viewpager