Android 缓冲进度条或加载进度条
那么,他们的具体源码在这里:loading_1:
[java]? view plain copy print ?
<?xml?version="1.0"?encoding="utf-8"?>??
<rotate???
????xmlns:android="http://schemas.android.com/apk/res/android"??
????android:fromDegrees="0"??
????android:pivotX="50%"??
????android:pivotY="50%"??
????android:toDegrees="1080.0"?>??
????<shape??
????????android:innerRadiusRatio="3"??
????????android:shape="ring"??
????????android:thicknessRatio="8"??
????????android:useLevel="false"?>??
????????<gradient??
????????????android:centerColor="#FFDC35"??
????????????android:centerY="0.50"??
????????????android:endColor="#CE0000"??
????????????android:startColor="#FFFFFF"??
????????????android:type="sweep"??
????????????android:useLevel="false"?/>??
????</shape>??
</rotate>??
loading_2:
[java]? view plain copy print ?
[![派
生到我的代码片](https://code.csdn.net/assets/ico_fork.svg)](https://code.csdn.net/snippets/465892/fork "派生到我的代码片")
<?xml?version="1.0"?encoding="utf-8"?>??
<layer-list?xmlns:android="http://schemas.android.com/apk/res/android"?>??
????<item?>??
????????<rotate??
????????????android:drawable="@drawable/movie_loading"??
????????????android:fromDegrees="0.0"??
????????????android:pivotX="50.0%"??
????????????android:pivotY="50.0%"??
????????????android:toDegrees="1080.0"?/>??
????</item>??
</layer-list> ?
activity_main.java:
[java]? view plain copy print ?
<LinearLayout?xmlns:android="http://schemas.android.com/apk/res/android"??
????xmlns:tools="http://schemas.android.com/tools"??
????android:layout_width="match_parent"??
????android:layout_height="match_parent"??
????android:orientation="horizontal"??
????android:gravity="center_horizontal"??
评论