安卓一个有限/无限加载动画效果
2017-09-20 09:52
621 查看
Usage
Add AnimatedCircleLoadingView to your layout and define mainColor and secondaryColor as custom attributes:<com.github.jlmd.animatedcircleloadingview.AnimatedCircleLoadingView xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/circle_loading_view" android:layout_width="250dp" android:layout_height="250dp" android:background="@color/background" android:layout_centerInParent="true" app:animCircleLoadingView_mainColor="@color/main_color" app:animCircleLoadingView_secondaryColor="@color/secondary_color" app:animCircleLoadingView_textColor="@android:color/white" />DeterminateStart determinate:
animatedCircleLoadingView.startDeterminate();Modify percent:
animatedCircleLoadingView.setPercent(10);If percent is 100, the animation ends with success animation. On error you must call stopFailure() method, then the application ends with failure animation.IndeterminateStart indeterminate:
animatedCircleLoadingView.startIndeterminate();Stop with success:
animatedCircleLoadingView.stopOk();Stop with failure:
animatedCircleLoadingView.stopFailure();Reset loading:
animatedCircleLoadingView.resetLoading();
Gradledependency
Add repository to your build.gradlerepositories { maven { url "http://dl.bintray.com/jlmd/maven" } }Add dependency to your build.gradle
compile 'com.github.jlmd:AnimatedCircleLoadingView:1.1.5@aar'
转自github:https://github.com/jlmd/AnimatedCircleLoadingView
相关文章推荐
- (安卓效果)AVLoadingIndicatorView 漂亮的加载动画
- 一个加载时带动画效果的ListBoxItem
- 一个简单实用的的加载动画(跳点效果)
- 安卓开发加载中效果类似progressDialog效果加载动画
- 关于安卓开发中Activity动画切换效果无效的一个总结
- mel加载一个物体不同姿态的模型实现动画效果
- 安卓学习笔记---Android仿美团加载数据、小人奔跑进度动画对话框(以及顺丰快递员奔跑效果)
- 菊花转动的jquery加载动画效果
- 利用canvas实现的加载动画效果实例代码
- CSS3使用AnimationEnd为同一个元素添加多个动画效果
- iOS(学习) 一个简单的动画效果
- Swift - 一个纯代码实现的登录界面(带猫头鹰动画效果)
- 在安卓中使用AnimationSet类同时执行多种动画效果
- 一个很酷的加载loading效果--IT蓝豹
- Android上一个动画效果的实现与优化
- Android酷炫动画效果之进度加载动画
- 安卓加载动画崩溃
- jquery Ajax 实现加载数据前动画效果的示例代码
- android一个布局由消失变为可见时实现动画效果
- HTML5实现的图片无限加载的瀑布流效果另带边框圆角阴影