我想要一个确定的圆形进度条,例如电报android app,但是我在项目源中找不到它。

它正在旋转

更新:我正在使用物质进度,但是它不能在确定模式下旋转,我想要的是在加载时旋转...就像电报应用程序一样。
在 res/anim 文件夹中创建一个 rotate.xml:
<?xml version="1.0" encoding="UTF-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1600"
android:fromDegrees="0"
android:interpolator="@android:anim/linear_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:toDegrees="360" />
Run Code Online (Sandbox Code Playgroud)
加载动画并在代码中运行:
view.startAnimation(AnimationUtils.loadAnimation(activity, R.anim.rotate));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1350 次 |
| 最近记录: |