半透明<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代码

    1. View v = findViewById(R.id.content);//找到你要设透明背景的layout 的id
    2. v.getBackground().setAlpha(100);//0~255透明度值

Button 或 ImageButton 背景设为 透明 或半透明 (转)的更多相关文章

  1. Button或者ImageButton的背景设为透明或者半透明

    Button或者ImageButton的背景设为透明或者半透明 半透明<Button android:background="#e0000000" ... /> 透明& ...

  2. Android 如何把一个 RelativeLayout或ImageView背景设为透明

    在项目中,需要把RelativeLayout 和  ImageView背景设置为透明,怎么实现呢?这里主要通过代码,请参阅以下关键代码: public ImageView imgDetail; pri ...

  3. android 设置Button或者ImageButton的背景透明 半透明 透明

    Button或者ImageButton的背景设为透明或者半透明 半透明<Button android:background="#e0000000" ... />  透明 ...

  4. Android 设置按钮背景透明与半透明_图片背景透明

    Button或者ImageButton的背景设为透明或者半透明 半透明<Button android:background="#e0000000" ... />  透明 ...

  5. ImageButton去边框&Button或者ImageButton的背景透明

    在ImageButton中载入图片后,很多人会觉得有图片周围的白边会影响到美观,其实解决这个问题有两种方法 一种方法是将ImageButton的背景改为所需要的图片.如:android:backgro ...

  6. Android中Button、ImageButton、ImageView背景设置区别

    Button与ImageButton实际两者无关,Button继承自TextView,不支持src;ImageButton继承自ImageView.同一张图片在不设置大小,默认显示时,使用Button ...

  7. Button、ImageButton及ImageView详解

    Button.ImageButton及ImageView详解 在应用程序开发过程中,很多时候需要将View的background或者src属性设置为图片,即美观又支持点击等操作.常见的有Button. ...

  8. Android控件——Button与ImageButton

    1.简单介绍

  9. Android监听Button和ImageButton控件的点击事件

    一.onClick事件 Button和ImageButton都有一个onClick事件,通过自身的.setOnClickListener(OnClickListener)方法添加点击事件 所有的控件都 ...

随机推荐

  1. ats编译中增加透明度 选项

    在大多数情况下,如果环境支持透明度,则configure将自动启用它.对于其他环境,可能需要 配置configure 选项. --enable-posix-cap 这实现了POSIX功能,这是透明度所 ...

  2. GlusterFS分布式存储集群-1. 部署

    参考文档: Quick Start Guide:http://gluster.readthedocs.io/en/latest/Quick-Start-Guide/Quickstart/ Instal ...

  3. centos7.6 安装配置rabbitmq

    IP地址:192.168.200.108 安装erlang 和 依赖环境 yum install -y socat yum install -y erlang 安装rabbitmq yum insta ...

  4. XSS(Cross Site Script)

    类型一:反射型XSS 简单地把用户输入的数据“反射”给浏览器.也就是说,黑客需要诱使用户“点击”一个恶意链接,才能攻击成功. 类型二:存储型XSS 把用户输入的数据“存储”在服务器端.这种XSS具有很 ...

  5. BugPhobia开发篇章:Scurm Meeting-更新至0x03

    0x01 :目录与摘要 If you weeped for the missing sunset, you would miss all the shining stars 索引 提纲 整理与更新记录 ...

  6. wcf服务查看工具

    文章:接口测试工具soapUI(一) 文章:VS自带WCF测试客户端简单介绍

  7. asp.net登录验证FormsAuthenticationTicket和FormsAuthentication类

    登录部分使用的类 FormsAuthentication   为 Web 应用程序管理 Forms 身份验证服务. 配置启用身份验证,WEB.config配置: <system.web> ...

  8. 结对项目作业GUI

    一.Coding.Net项目地址:https://git.coding.net/zhengsh589/CoupleProject.git 二.PSP表格(完成前): PSP 任务内容 计划共完成需要的 ...

  9. 07_Java基础语法_第7天(练习)_讲义

    今日内容介绍 1.循环练习 2.数组方法练习 01奇数求和练习 * A: 奇数求和练习 * a: 题目分析 * 为了记录累加和的值,我们需要定义一个存储累加和的变量 * 我们要获取到1-100范围内的 ...

  10. KEIL C51代码优化详细分析

    阅读了<单片机与嵌入式系统应用>2005年第10期杂志<经验交流>栏目的一篇文章<Keil C51对同一端口的连续读取方法>(原文)后,笔者认为该文并未就此问题进行 ...