效果图:

Android加载动画库

使用方法:

Step 1

       implementation 'com.wang.avi:library:2.1.3'
    


Step 2

添加这个Ui到你的布局  androdi:visibility最好设置为“gone”

简单用法:

  <com.wang.avi.AVLoadingIndicatorView
        android:layout_width="wrap_content"  
        android:layout_height="wrap_content"
        app:indicatorName="BallPulseIndicator"
        />


高级用法:

  <com.wang.avi.AVLoadingIndicatorView
        android:id="@+id/avi"
        android:layout_width="wrap_content"  //or your custom size
        android:layout_height="wrap_content"  //or your custom size
        style="@style/AVLoadingIndicatorView"// or AVLoadingIndicatorView.Large or AVLoadingIndicatorView.Small
        android:visibility="visible"  //visible or gone
        app:indicatorName="BallPulseIndicator"//Indicator Name
        app:indicatorColor="your color"
        />


Step 3:

 代码中调用:

 void startAnim(){
        avi.show();
        // or avi.smoothToShow();
   }
   
   void stopAnim(){
        avi.hide();
        // or avi.smoothToHide();
   }


详细见原Github:https://github.com/81813780/AVLoadingIndicatorView


相关文章:

  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2021-11-29
  • 2021-08-03
猜你喜欢
  • 2021-12-18
  • 2021-04-05
  • 2021-11-16
  • 2022-01-02
  • 2021-10-06
  • 2021-11-05
  • 2021-12-26
相关资源
相似解决方案