设置图片透明度alpha注意
2012-04-21 02:38
218 查看
imgTextGray = new ImageView(this);
imgTextGray.setBackgroundResource(R.drawable.slidetext_gray);
private void alphaSlideText(int alphaValue){
if(imgTextGray != null){
Log.e(TAG, "alphaSlideText = "+alphaValue);
imgTextGray.getBackground().setAlpha(alphaValue);//注意不能写成imgTextGray.setAlpha(alphaValue);否则ALPHA会不起作用.
imgTextGray.invalidate();
}
}
imgTextGray.setBackgroundResource(R.drawable.slidetext_gray);
private void alphaSlideText(int alphaValue){
if(imgTextGray != null){
Log.e(TAG, "alphaSlideText = "+alphaValue);
imgTextGray.getBackground().setAlpha(alphaValue);//注意不能写成imgTextGray.setAlpha(alphaValue);否则ALPHA会不起作用.
imgTextGray.invalidate();
}
}
相关文章推荐
- Android图片淡化 透明度 设置Alpha值
- android 通过setalpha设置透明度 无效及3.0以下不兼容的问题
- android ListView item 点击设置背景图片需要注意的问题
- CSS 设置图片透明度
- Qt中设置widget背景颜色/图片的注意事项(使用样式表 setStyleSheet())
- C#给图片加水印标记,可设置透明度
- 154在屏幕中绘图时设置透明度(扩展知识:为图片视图添加点击手势识别器,来实现点击事件操作)
- Qt中设置widget背景颜色/图片的注意事项(使用样式表 setStyleSheet())
- 设置图片Alpha
- css样式设置图片半透明度,兼容各种浏览器
- java 图片加水印,设置透明度。说明很详细
- Alpha融合和图片透明度[AlphaBlend]
- 图片设置的时候注意
- 设置图片透明度的四种方法
- android设置背景或者图片透明度
- Qt中设置widget背景颜色背景图片的注意事项
- android 通过setalpha设置透明度 无效及3.0以下不兼容的问题
- javascript 设置图片透明度与图片的水平垂直旋转
- backgroundColor的背景颜色alpha透明度设置
- css图片透明度设置问题