GithubDemo地址:https://github.com/castorflex/SmoothProgressBar
效果图如下:
gradle上添加下面这段代码
dependencies { // of course, do not write x.x.x but the version number compile 'com.github.castorflex.smoothprogressbar:library:x.x.x' // or compile 'com.github.castorflex.smoothprogressbar:library-circular:x.x.x' }
布局文件写下面这段代码
<fr.castorflex.android.smoothprogressbar.SmoothProgressBar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:indeterminate="true" app:spb_sections_count="4" app:spb_color="#FF0000" app:spb_speed="2.0" app: