android布局设置Button或者ImageButton的背景透明 半透明 透明
来源:互联网 发布:套路 知乎 编辑:程序博客网 时间:2024/05/19 16:21
Button或者ImageButton的背景设为透明或者半透明
半透明<Button
android:background="#e0000000"
android:text="button"
/>
透明<Button
android:background="#00000000"
android:text="imagebutton"
/>
颜色和不透明度 (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透明度值
v.getBackground().setAlpha(100);//0~255透明度值
- Android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明 透明
- android布局设置Button或者ImageButton的背景透明 半透明 透明
- android 设置Button或者ImageButton的背景透明 半透明
- Button或者ImageButton的背景设为透明或者半透明
- Button或者ImageButton的背景设为透明或者半透明
- Button或者ImageButton的背景设为透明或者半透明
- Button或者ImageButton的背景设为透明或者半透明
- Button或者ImageButton的背景设为透明或者半透明
- Button或者ImageButton的背景设为透明或者半透明
- Android中设置Button或者ImageButton的背景透明
- Redhat Linux NFS配置
- symbian塞班系统支持格式
- 基于CentOS5.x的munin 服务器监控安装配置
- Android模拟键盘和键盘监听的一些调研
- NSOperation
- android布局设置Button或者ImageButton的背景透明 半透明 透明
- KMP Next求法 AC自动机 自动机 Trie POJ
- 任务计划
- 程序员新年要做的10个决定
- poj3710
- ubuntu root 初始密码问题
- Struts2基础知识
- 行列互换
- 基于XML配置的输入校验