Skip to content

Latest commit

 

History

History
75 lines (47 loc) · 3.07 KB

README_zh-CN.md

File metadata and controls

75 lines (47 loc) · 3.07 KB

Android-SpinKit

Android 加载动画(SpinKit的Android版本实现)

Demo Apk

效果

Gradle 依赖

dependencies {
   implementation 'com.github.ybq:Android-SpinKit:1.4.0'
}

使用

  • Xml
<com.github.ybq.android.spinkit.SpinKitView
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/spin_kit"
    style="@style/SpinKitView.Large.Circle"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    app:SpinKit_Color="@color/colorAccent" />         
  • ProgressBar
ProgressBar progressBar = (ProgressBar)findViewById(R.id.progress);
DoubleBounce doubleBounce = new DoubleBounce();
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
RotatingCircle RotatingCircle

##感谢