Android-SpinKit 进度条 (ProgressBar)

Android loading animations

https://ybq.github.io/Android-SpinKit

介绍:

多个漂亮的加载效果。

运行效果:

使用说明:

 

Gradle 依赖

1.在项目根目录的build.gradle添加

  1. allprojects {
  2.         repositories {
  3.             ...
  4.             maven { url "https://jitpack.io" }
  5.         }
  6.     }

2.添加依赖

  1. dependencies {
  2.     compile 'com.github.ybq:Android-SpinKit:1.0.1'
  3.  }

使用

  1. <com.github.ybq.android.spinkit.SpinKitView 
  2.      xmlns:app="http://schemas.android.com/apk/res-auto"
  3.      android:id="@+id/spin_kit"
  4.      style="@style/SpinKitView.Large.Circle"
  5.      android:layout_width="wrap_content"
  6.      android:layout_height="wrap_content"
  7.      android:layout_gravity="center"
  8.      app:SpinKit_Color="@color/colorAccent" />
  1. @style/SpinKitView
  2. @style/SpinKitView.Circle
  3. @style/SpinKitView.Large
  4. @style/SpinKitView.Small
  5. @style/SpinKitView.Small.DoubleBounce

               

ProgressBar

  1. ProgressBar progressBar = (ProgressBar)findViewById(R.id.progress);
  2. DoubleBounce doubleBounce = new DoubleBounce();
  3. progressBar.setIndeterminateDrawable(doubleBounce);

样式:

样式预览
RotatingPlane RotatingPlane
DoubleBounce DoubleBounce
Wave Wave
WanderingCubes WanderingCubes
Pulse Pulse
ChasingDots ChasingDots
ThreeBounce ThreeBounce
Circle Circle
CubeGrid CubeGrid
FadingCircle FadingCircle
FoldingCube FoldingCube

 

他们收藏了这篇文章
posted @ 2019-01-23 14:25  野狼谷  阅读(788)  评论(0编辑  收藏  举报