/**
* Add an action to set the alpha of a view. Can be called multiple times.
* Alpha between 0-1.
* 设置控件的显示的透明度
*/
public BaseAdapterHelper setAlpha(int viewId, float value) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
retrieveView(viewId).setAlpha(value);
} else {
// Pre-honeycomb hack to set Alpha value
AlphaAnimation alpha = new AlphaAnimation(value, value);
alpha.setDuration(0);
alpha.setFillAfter(true);
retrieveView(viewId).startAnimation(alpha);
}
return this;
}
BaseAdapterHelper.java 文件源码
java
阅读 44
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录