android - 无需 ListView 即可滑动刷新布局

标签 android

我想刷新页面,但没有 listviewrecyclerview 之类的东西。我想向下滑动来刷新 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/

相关文章:

android - 如何在 Android 中为密码字段显示数字软键盘

javascript - 下载后图库不显示图像?

java - Android中使用特殊字符验证手机号码

java - 无法从 AndroidManifest.xml 读取 packageName

java - 在 ListView 中显示多维数组中的行中的两列 - android

java - OpenCV : Contour Detection Android contourldx problems

通过Root获取Android系统权限

java - Toast Message 不消失

android - 如何创建一个 Android 监听器来捕获来自 Whatsapp 或其他人的所有传入/传出图像/视频?

Android/Windows 混合应用