FaceBook微光闪烁---第三方开源--shimmer-android

Android上的微光闪烁shimmer效果,实现的手段不少,其中比较好的是facebook做的开源库:shimmer-android,其在github上的项目主页是:https://github.com/facebook/shimmer-android 另外一个链接:http://facebook.github.io/shimmer-android/ 其实指向的项目都是一个项目内容。
要使用facebook的Android Shimmer微光闪烁,需要先到其主页下载jar包,下载后直接放到自己Eclipse的项目libs里面。然后在布局文件中写一个com.facebook.shimmer.ShimmerFrameLayout布局,包裹自己的view.
比如一个TextView:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
> <com.facebook.shimmer.ShimmerFrameLayout
android:id="@+id/shimmer_view_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" > <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#ffc400"
android:padding="10dip"
android:text="android"
android:textColor="#eeeeee"
android:textSize="20sp" />
</com.facebook.shimmer.ShimmerFrameLayout> </RelativeLayout>
package com.zzw.shimmer; import com.facebook.shimmer.ShimmerFrameLayout; import android.app.Activity;
import android.os.Bundle; public class MainActivity extends Activity { @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); ShimmerFrameLayout container = (ShimmerFrameLayout) findViewById(R.id.shimmer_view_container); //执行的时长
container.setDuration(2500); //开始执行效果
container.startShimmerAnimation();
}
}
FaceBook微光闪烁---第三方开源--shimmer-android的更多相关文章
- 更强的微光闪烁效果--第三方开源--Shimmer-android
Shimmer-android在github上的项目主页是:https://github.com/RomainPiel/Shimmer-android Shimmer-android干脆在Androi ...
- Android第三方开源SwitchButton
Android第三方开源SwitchButton Android SwitchButton是github上的一个第三方开源项目,其项目主页是:https://github.com/kyleduo/Sw ...
- Android Studio 简介及导入 jar 包和第三方开源库方[转]
原文:http://blog.sina.com.cn/s/blog_693301190102v6au.html Android Studio 简介 几天前的晚上突然又想使用 Android Studi ...
- 开源框架】Android之史上最全最简单最有用的第三方开源库收集整理,有助于快速开发
[原][开源框架]Android之史上最全最简单最有用的第三方开源库收集整理,有助于快速开发,欢迎各位... 时间 2015-01-05 10:08:18 我是程序猿,我为自己代言 原文 http: ...
- Android 第三方开源下拉框:NiceSpinner
Android原生的下拉框Spinner基本上可以满足Android开发对于下拉选项的设计需求,但现在越来越流行的下拉框不满足于Android原生提供的下拉框Spinner所提供的设计样式,而改用自定 ...
- Android 第三方开源库收集整理(转)
原文地址:http://blog.csdn.net/caoyouxing/article/details/42418591 Android开源库 自己一直很喜欢Android开发,就如博客签名一样, ...
- 45.Android 第三方开源库收集整理(转)
原文地址:http://blog.csdn.net/caoyouxing/article/details/42418591 Android开源库 自己一直很喜欢Android开发,就如博客签名一样, ...
- Android第三方开源对话消息提示框:SweetAlertDialog(sweet-alert-dialog)
Android第三方开源对话消息提示框:SweetAlertDialog(sweet-alert-dialog) Android第三方开源对话消息提示框:SweetAlertDialog(sweet- ...
- Android的SwipeToDismiss第三方开源框架模拟QQ对话列表侧滑删除,置顶,将头像图片圆形化处理。
<Android SwipeToDismiss:左右滑动删除ListView条目Item> Android的SwipeToDismiss是github上一个第三方开源框架(github ...
随机推荐
- Android中通过广播方式调起第三方App
今天紧急的跟进一个百度视频App无法调起百度贴吧App的问题,当然,这个是只发现是在4.x的android系统下发生,在2.x版本下,一切正常,(其实是3.1及以上的版本都有问题)具体场景为: 1.贴 ...
- JDK6的switch支持不是很好
在switch中只支持int或者枚举型值: 不支持其他类型,如String,会报错 Cannot switch on a value of type String for source level b ...
- BPMN
1.私有业务流程: 特定行业规则制度比如惠普生产线流程-针对业务人员 2.公有业务流程: 技术实现-针对流程开发人员 http://www.blogjava.net/RongHao/archive/2 ...
- history.back(-1)和history.go(-1)的区别
history.back(-1):直接返回当前页的上一页,数据全部消息,是个新页面 history.go(-1):也是返回当前页的上一页,不过表单里的数据全部还在 返回到指定连接:document.l ...
- 01-CALayer的基本操作
*:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...
- OC基础(8)
自定义代码段 实例变量修饰符 依赖关系 *:first-child { margin-top: 0 !important; } body > *:last-child { margin-bott ...
- C# 泛型List用法
C# List Examples by Sam Allen - Updated September 6, 2009 Problem. You have questions about the List ...
- 如何实现从Android第三方平台推送微信公众号
最近心血来潮,想要尝试写写有关实现Android平台第三方应用软件去跳转到微信平台的代码.我只是先暂时写写我的思路,如后期实现,便将主要代码附上. 微信公众平台官方宣布微信沟通接口正式上线,用户可以在 ...
- ODCA最佳实践翻译:Architecting Cloud-Aware Applications (一)
Architecting Cloud-Aware Applications ** ODCA(Open Data Center Alliance)最佳实践 ** MagicBowen(e.bowen.w ...
- com学习前提必看
1) COM组件实际上是一个C++类,而接口都是纯虚类.组件从接口派生而来.我们可以简单的用纯粹的C++的语法形式来描述COM是个什么东西: class IObject { public: virtu ...