LoaderViewLibrary 介绍
LoaderViewLibrary,一个用于在等待文字和图片加载时显示加载动画的库。
运行效果:
示例代码:
在布局文件中定义TextView的加载页面
<com.elyeproj.loaderviewlibrary.LoaderTextView android:layout_width="match_parent" android:layout_height="wrap_content" />
在布局文件中定义ImageView的加载页面
<com.elyeproj.loaderviewlibrary.LoaderImageView android:layout_width="100dp" android:layout_height="100dp" />
用width_weight定义TextView的宽度百分比用于显示加载动画
<com.elyeproj.loaderviewlibrary.LoaderTextView android:layout_width="match_parent" android:layout_height="wrap_content" app:width_weight="0.4" />
用height_weight定义TextView的高度百分比用于显示加载动画
<com.elyeproj.loaderviewlibrary.LoaderTextView android:layout_width="match_parent" android:layout_height="wrap_content" app:height_weight="0.8" />
用use_gradient定义TextView或ImageView的梯度用于显示加载动画
<com.elyeproj.loaderviewlibrary.LoaderTextView android:layout_width="match_parent" android:layout_height="wrap_content" app:use_gradient="true" />
LoaderViewLibrary 官网
https://github.com/elye/loaderviewlibrary
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。