【开源】shimmer-android
shimmer-android
- https://github.com/facebook/shimmer-android
介绍:
Shimmer是一个为任意View添加闪烁效果的库。适用于营造简约低调的加载提示,这个项目最初是为facebook的首页开发的。运行效果:
![]()
使用说明:
之前我们介绍了一个同名的项目,那个项目也是实现相同的效果,但是只针对文字:http://jcodecraeer.com/a/opensource/2015/0112/2296.html?1426238605 。
下面的代码
<com.facebook.shimmer.ShimmerFrameLayout android:id=“@+id/shimmer_view_container” android:layout_width=“wrap_content” android:layout_height="wrap_content" > ...(your complex view here)... </com.facebook.shimmer.ShimmerFrameLayout>
在java代码中需要这样开启动画
ShimmerFrameLayout container = (ShimmerFrameLayout) findViewById(R.id.shimmer_view_container); container.startShimmerAnimation();
posted on 2015-04-29 10:14 wasdchenhao 阅读(157) 评论(0) 收藏 举报

浙公网安备 33010602011771号