我想刷新页面,但没有 listview
或 recyclerview
之类的东西。我想向下滑动来刷新 fragment 。应该还有动画。
是否可以使用滑动刷新模块而不使用任何listview
等
感谢回复
最佳答案
是的,您也可以与LinearLayout、RelativeLayout一起使用。请参阅下面的代码了解更多详细信息,
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
// Other child views
</LinearLayout>
</android.support.v4.widget.SwipeRefreshLayout>
谢谢。
关于android - 无需 ListView 即可滑动刷新布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50887440/