Skip to content

Latest commit

 

History

History
102 lines (67 loc) · 3.7 KB

README_zh-CN.md

File metadata and controls

102 lines (67 loc) · 3.7 KB

Android-SpinKit

Android 加载动画(参照SpinKit写了个android版本)

效果

Gradle 依赖

  1. 在项目根目录的build.gradle添加
allprojects {
   	repositories {
   		...
   		maven { url "https://jitpack.io" }
   	}
   }
  1. 添加依赖
dependencies {
   compile 'com.github.ybq:Android-SpinKit:1.0.4'
}

使用

  • 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

##感谢

##LICENSE

 Copyright ybq 2016

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.