效果图:


使用方法:

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


更多相关文章

  1. 【Android动态布局】之【LayoutInflater的使用】
  2. android:layout_marginHorizontal="" 无作用
  3. Android Fragment Demo(适合初学者)
  4. [置顶] Android 四种基本布局LinearLayout、RelativeLayout、Fra
  5. android LinearLayout布局
  6. Android 线性布局 计算器
  7. 相对布局练习
  8. 线性布局练习
  9. android 布局 LinearLayout

随机推荐

  1. android折叠展开列表动态修改显示测试
  2. Android实现手机定位的案例代码
  3. 简析API属性——API 23 view.View
  4. Android P 限制级API调用弹窗关闭
  5. Android第一个程序——打招呼
  6. Android 弧形进度条
  7. android生成json
  8. Android重启应用程序代码
  9. Android OpenCV 灰度图转化
  10. Android Bitmap用法大全,以后再也不担心了