android 设置Button或者ImageButton的背景透明 半透明 透明
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 设置Button或者ImageButton的背景透明 半透明 透明的更多相关文章
- Button或者ImageButton的背景设为透明或者半透明
Button或者ImageButton的背景设为透明或者半透明 半透明<Button android:background="#e0000000" ... /> 透明& ...
- Android中Button、ImageButton、ImageView背景设置区别
Button与ImageButton实际两者无关,Button继承自TextView,不支持src;ImageButton继承自ImageView.同一张图片在不设置大小,默认显示时,使用Button ...
- ImageButton去边框&Button或者ImageButton的背景透明
在ImageButton中载入图片后,很多人会觉得有图片周围的白边会影响到美观,其实解决这个问题有两种方法 一种方法是将ImageButton的背景改为所需要的图片.如:android:backgro ...
- Android 按钮 Button和ImageButton
Button -- 按钮ImageButton -- 图片按钮Button和ImageButton特征1.共有的特征都可以作为一个按钮产生点击事件2.不同点: (1)Button有text属性,Ima ...
- Android自定义Button字体颜色和背景颜色
http://blog.csdn.net/breeze666/article/details/7747649
- Android 设置按钮背景透明与半透明_图片背景透明
Button或者ImageButton的背景设为透明或者半透明 半透明<Button android:background="#e0000000" ... /> 透明 ...
- 如何设置TextView控件的背景透明度和字体透明度
如何设置TextView控件的背景透明度和字体透明度 设计师给的标注都是类似这样的: 字号:26 颜色:#000000 透明度:80% 其实,程序上只要需要一个色值就OK了,那么这个色值我如何计算呢? ...
- 设置TextView控件的背景透明度和字体透明度
TextView tv = (TextView) findViewById(R.id.xx); 第1种:tv.setBackgroundColor(Color.argb(255, 0, 255, 0) ...
- android设置背景半透明效果
1.Button或者ImageButton的背景透明或者半透明 半透明:<Button android:background="#e0000000"···> 透明:&l ...
随机推荐
- asp.net中iframe页面用jQuery向父页面传值
在asp.net页面有时一个页面会通过iframe嵌套另一个页面,下面的例子讲述的是被嵌套的iframe页面向父页传值的一种方式,用jQuery即可. iframe页面代码: <!DOCTYPE ...
- 关于lnmp下搭thinkPHP无法找到指定静态页面
我在lnmp 下架了一个thinkPHP框架,非常奇怪,在环境都配置好后,我在url里输入localhost:10007/index.php/member/login,正常来说应该显示login.ht ...
- CentOS6.7搭建蜜罐dionaea
yum -y install epel-release wget tar git autoconf* libtool-* mkdir /opt/dionaea 1.安装liblcfg软件.git cl ...
- CURL常用命令(转)
下载单个文件,默认将输出打印到标准输出中(STDOUT)中 curl http://www.centos.org 通过-o/-O选项保存下载的文件到指定的文件中:-o:将文件保存为命令行中指定的文件名 ...
- Volume rendering
Volume rendering Reconstruction filter UCDAVIS
- Android Mina框架的学习笔记
Apache MINA(Multipurpose Infrastructure for Network Applications) 是 Apache 组织一个较新的项目,它为开发高性能和高可用性的网络 ...
- python 内存监控模块之memory_profiler
0. memory_profiler是干嘛的 This is a python module for monitoring memory consumption of a process as wel ...
- Visual Studio 编译纯 C 项目的方法
项目属性 -> 配置属性 -> C/C++ -> 高级 -> 编译为 -> 选择 `编译为C代码(/TC)` 参考资料: http://stackoverflow.com ...
- IIS+WebMatrix 做 PHP 遇到的问题总结
1. URL Binding Failure Webmatrix 解决办法: 用管理员权限运行 WebMatrix 并且 改 Port. 我反正是随便输入了一个 Port 就成功了, 默认的是 610 ...
- [转]qt中文乱码问题
http://blog.csdn.net/brave_heart_lxl/article/details/7186631#