【问题标题】:Swipe refresh layout animation android滑动刷新布局动画android
【发布时间】:2015-10-19 11:55:55
【问题描述】:

我正在使用 Eclipse 进行 Android 开发。我在我的应用程序中使用了 swipeRefreshLayout。我的问题是,当我滑动环形(圆形动画)动画时,不显示线条水平类型,但我为滑动固定的颜色工作正常,而且我想在滑动时花一些距离和时间。请帮助我如何在滑动时显示圆形旋转动画。

 <android.support.v4.widget.SwipeRefreshLayout
                android:id="@+id/swipe_refresh"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:focusable="true" >

                <android.support.v4.view.ViewPager
                    android:id="@+id/pager"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="8" />
            </android.support.v4.widget.SwipeRefreshLayout>

请参考下图

我想这样展示

提前致谢

【问题讨论】:

  • 你用什么来添加swipeRefreshLayout?你能用它粘贴布局文件吗?
  • 请您参考我刚才的编辑帖子,我用代码和图像编辑了我的问题
  • 你的 targetSdkVersion 是什么?
  • 目标 sdk 版本为 21

标签: android swiperefreshlayout


【解决方案1】:

您的问题的答案是您无法使用支持库来做到这一点。 Android 将根据您的应用正在执行的操作系统版本来处理要显示的动画。

看看这个answer

SwipeRefreshLayout 会在顶部为您显示其预定义的动画

你可以试试this之类的库,但我建议在这个库上坚持谷歌,让动画自己处理。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多