写点什么

Android 缓冲进度条或加载进度条

用户头像
Android架构
关注
发布于: 17 小时前

那么,他们的具体源码在这里:loading_1:


[java]? view plain copy print ?




  1. <?xml?version="1.0"?encoding="utf-8"?>??

  2. <rotate???

  3. ????xmlns:android="http://schemas.android.com/apk/res/android"??

  4. ????android:fromDegrees="0"??

  5. ????android:pivotX="50%"??

  6. ????android:pivotY="50%"??

  7. ????android:toDegrees="1080.0"?>??

  8. ????<shape??

  9. ????????android:innerRadiusRatio="3"??

  10. ????????android:shape="ring"??

  11. ????????android:thicknessRatio="8"??

  12. ????????android:useLevel="false"?>??

  13. ????????<gradient??

  14. ????????????android:centerColor="#FFDC35"??

  15. ????????????android:centerY="0.50"??

  16. ????????????android:endColor="#CE0000"??

  17. ????????????android:startColor="#FFFFFF"??

  18. ????????????android:type="sweep"??

  19. ????????????android:useLevel="false"?/>??

  20. ????</shape>??

  21. </rotate>??


loading_2:


[java]? view plain copy print ?



[![派


《Android学习笔记总结+最新移动架构视频+大厂安卓面试真题+项目实战源码讲义》
浏览器打开:qq.cn.hn/FTe 免费领取
复制代码


生到我的代码片](https://code.csdn.net/assets/ico_fork.svg)](https://code.csdn.net/snippets/465892/fork "派生到我的代码片")


  1. <?xml?version="1.0"?encoding="utf-8"?>??

  2. <layer-list?xmlns:android="http://schemas.android.com/apk/res/android"?>??

  3. ????<item?>??

  4. ????????<rotate??

  5. ????????????android:drawable="@drawable/movie_loading"??

  6. ????????????android:fromDegrees="0.0"??

  7. ????????????android:pivotX="50.0%"??

  8. ????????????android:pivotY="50.0%"??

  9. ????????????android:toDegrees="1080.0"?/>??

  10. ????</item>??

  11. </layer-list> ?


activity_main.java:


[java]? view plain copy print ?




  1. <LinearLayout?xmlns:android="http://schemas.android.com/apk/res/android"??

  2. ????xmlns:tools="http://schemas.android.com/tools"??

  3. ????android:layout_width="match_parent"??

  4. ????android:layout_height="match_parent"??

  5. ????android:orientation="horizontal"??

  6. ????android:gravity="center_horizontal"??

用户头像

Android架构

关注

还未添加个人签名 2021.10.31 加入

还未添加个人简介

评论

发布
暂无评论
Android缓冲进度条或加载进度条