Android开发_如何设置按钮背景透明与半透明_图片背景透明
来源:互联网 发布:手机数据是什么 编辑:程序博客网 时间:2024/04/30 13:09
Button或者ImageButton的背景设为透明或者半透明
半透明<Button android:background="#e0000000" ... />
透明<Button android:background="#00000000" ... />
颜 色和不透明度 (alpha) 值以十六进制表示法表示。任何一种颜色的值范围都是 0 到 255(00 到 ff)。对于 alpha,00 表示完全透明,ff 表示完全不透明。表达式顺序是“aabbggrr”,其中“aa=alpha”(00 到 ff);“bb=blue”(00 到 ff);“gg=green”(00 到 ff);“rr=red”(00 到 ff)。例如,如果您希望对某叠加层应用不透明度为 50% 的蓝色,则应指定以下值:7fff0000
设置背景图片透明度(超简单)
Java代码
- View v = findViewById(R.id.content);//找到你要设透明背景的layout 的id
- v.getBackground().setAlpha(100);//0~255透明度值
- Android开发_如何设置按钮背景透明与半透明_图片背景透明
- Android开发_如何设置按钮背景透明与半透明_图片背景透明
- Android开发_如何设置按钮背景透明与半透明_图片背景透明
- Android开发_如何设置按钮背景透明与半透明_图片背景透明
- Android开发_如何设置按钮背景透明与半透明_图片背景透明
- Android开发_如何设置按钮背景透明与半透明_图片背景透明
- Android开发_如何设置按钮背景透明与半透明_图片背景透明
- 安卓学习:设置按钮背景透明与半透明_图片背景透明
- android设置按钮背景透明
- Android背景设置透明和半透明效果
- android activity设置透明或者半透明背景
- 设置按钮背景透明
- Android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- linux iscsi tgtd的安装学习及问题
- Ubuntu编译安装boost并在eclipse C/C++中使用
- windows进程能打开的最大句柄数目
- SVN与Git比较
- android 中英混合字符串数组按首字母进行排序
- Android开发_如何设置按钮背景透明与半透明_图片背景透明
- postgresql 加解密
- 2012-04-24 14:34 struts2监听器首先要实现com.opensymphony.xwork2.interceptor.PreResultListener类
- ognl.ExpressionSyntaxException: Malformed OGNL expression: nbsp;的解决
- Android设置文字粗体的方法
- IntelliJ IDEA的Singleton模版的修改
- windows8中的ListView控件的属性
- weblogic启动报错,登录失败。
- 去掉 IBM Portal7 主题里多余的功能