非常漂亮的进度指示器AVLoadingIndicatorView

来源:互联网 发布:git 下常用linux命令 编辑:程序博客网 时间:2024/05/08 13:10

AVLoadingIndicatorView

Introduction

AVLoadingIndicatorView is a collection of nice loading animations for Android.

You can also find iOS version of this here.

Demo

Download Apk

Usage

Step 1

Add dependencies in build.gradle.

    dependencies {       compile 'com.wang.avi:library:1.0.5'       compile 'com.nineoldandroids:library:2.4.0'    }

Step 2

Add the AVLoadingIndicatorView to your layout:

    <com.wang.avi.AVLoadingIndicatorView        android:id="@+id/avloadingIndicatorView"        android:layout_width="wrap_content"  //or your custom size        android:layout_height="wrap_content"  //or your custom size        android:visibility="visible"  //visible or gone        app:indicator="BallPulse"        app:indicator_color="your color"        />

Step 3

It's very simple use just like Progressbar.

   void startAnim(){        findViewById(R.id.avloadingIndicatorView).setVisibility(View.VISIBLE);   }   void stopAnim(){        findViewById(R.id.avloadingIndicatorView).setVisibility(View.GONE);   }

If you want use this with Dialog , Here are mine com.wang.avi.sample.MainActivity.

Indicators

As seen above in the Demo, the indicators are as follows:

Row 1

  • BallPulse
  • BallGridPulse
  • BallClipRotate
  • BallClipRotatePulse

Row 2

  • SquareSpin
  • BallClipRotateMultiple
  • BallPulseRise
  • BallRotate

Row 3

  • CubeTransition
  • BallZigZag
  • BallZigZagDeflect
  • BallTrianglePath

Row 4

  • BallScale
  • LineScale
  • LineScaleParty
  • BallScaleMultiple

Row 5

  • BallPulseSync
  • BallBeat
  • LineScalePulseOut
  • LineScalePulseOutRapid

Row 6

  • BallScaleRipple
  • BallScaleRippleMultiple
  • BallSpinFadeLoader
  • LineSpinFadeLoader

Row 7

  • TriangleSkewSpin
  • Pacman
  • BallGridBeat
  • SemiCircleSpin
项目地址:https://github.com/81813780/AVLoadingIndicatorView
0 0
原创粉丝点击