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 ...
随机推荐
- 蓝桥杯---波动数列(dp)(背包)(待解决)
问题描述 观察这个数列: 1 3 0 2 -1 1 -2 ... 这个数列中后一项总是比前一项增加2或者减少3. 栋栋对这种数列很好奇,他想知道长度为 n 和为 s 而且后一项总是比前一项增加a或者减 ...
- Hbase基础操作
$HBASE_HOME/bin/hbase org.apache.hadoop.hbase.mapreduce.RowCounter 'tablename'
- 【转】sed命令详解
原文:http://www.cnblogs.com/emanlee/archive/2013/09/07/3307642.html sed命令行格式为: sed [-nefri] 'command' ...
- Hive基础之COALESCE用法
语法: COALESCE(T v1, T v2, …) 返回参数中的第一个非空值:如果所有值都为NULL,那么返回NULL 以emp表为例: desc emp; empno int None enam ...
- Iptables 防火墙开放常见的22,53,80端口
用iptables防火墙 iptables -F # 允许包从22端口进入 iptables -A INPUT -p tcp --dport 22 -j ACCEPT # 允许从22端口进入的包返回 ...
- 基于jQuery的web在线流程图设计器GooFlow
简易的流程图设计控件,效果图: JavaScript源文件在GooFlow.js中,样式文件是GooFlow2.css.可以自定义样式. GooFlow_item类是每个项的样式属性. 但估计实现任务 ...
- Orchard官方文档翻译(二) 安装 Orchard
原文地址:http://docs.orchardproject.net/Documentation/Installing-Orchard 想要查看文档目录请用力点击这里 最近想要学习了解orchard ...
- Android开发-API指南-<activity-alias>
<activity-alias> 英文原文:http://developer.android.com/guide/topics/manifest/activity-alias-elemen ...
- int型的数到底最大值是多少?
本文摘自:http://blog.csdn.net/friendbaby/article/details/6822690 刚才在百度知道上看见一个网友问int型的数最大能存多少.这个问题其实计算机系统 ...
- PMP-产品范围与项目范围区别
如果你对项目管理.系统架构有兴趣,请加微信订阅号"softjg",加入这个PM.架构师的大家庭 1.产品范围--某项产品.服务或成果所具有的特性和功能. 2.项目范围--为交付具有 ...