Skip to content

Latest commit

 

History

History
64 lines (48 loc) · 3.17 KB

README_zh-CN.md

File metadata and controls

64 lines (48 loc) · 3.17 KB

Android-SpinKit

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

原项目Android-SpinKit 添加 Heartbeat效果

效果

Gradle 依赖

dependencies {
   implementation "top.hasiy:Android-SpinKit:1.0.0"
}

使用

  • Xml
<top.hasiy.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
Heartbeat Heartbeat

##感谢