android 设置背景为空(透明)
在给控件设置背景时像ps那样的背景透明
在3.0以下可以使用
imageView.setBackgroundResource(android.R.id.empty);
但是这个方法在3.0以上会出现
ERROR/AndroidRuntime(xxxxx): Caused by: android.content.res.Resources$NotFoundException: File from drawable resource ID #0x1020004
可以用imageview.setBackgroundColor(Color.parseColor("#00000000"));
或
imageview.setBackgroundColor(android.R.color.transparent);
android 设置背景为空(透明)的更多相关文章
- android设置背景图片透明
设置Activiyt为透明可以在Activity中引用系统透明主题android:theme="@android:style/Theme.Translucent" 设置背景图片透明 ...
- android设置背景半透明效果
1.Button或者ImageButton的背景透明或者半透明 半透明:<Button android:background="#e0000000"···> 透明:&l ...
- Android设置背景
一.设置图片背景 首先你先将一个的背景图片存入工程中res/drawble(当然drawble-hdpi.drawble-mdpi.drawble-ldpi中一个或者几个文件夹都可)文件夹中.假如我存 ...
- android设置Activity背景色为透明的3种方
方法一:这种方法比较简单,只有一个步骤,只需要在配置文件中把需要设置为透明的activity的样式设置为 Android:theme="@android:style/Theme.Transl ...
- Android 设置背景透明度
一些时候,我们须要为UI页面设置背景色,例如以下图所看到的: 上图已注: 背景颜色为#000000,透明度为40%: 那么.怎样在代码中表示呢? 首先须要了解: 颜色和不透明度 (alpha) 值以十 ...
- Android设置背景图像重复【整理自网络】
1:在res/drawable文件下新建一个xml文件tool_bar_bg_repeat.xml比如为: <?xml version="1.0" encoding=&quo ...
- Android设置背景图片平铺
以LinearLayout为例,它提供的background属性将会将背景图片拉伸,相当难看.其实我们仅仅需做少量的改动就能够实现web编程中css背景图片的效果.来试试吧. 创建反复的背景图片 在d ...
- android 设置Button或者ImageButton的背景透明 半透明 透明
Button或者ImageButton的背景设为透明或者半透明 半透明<Button android:background="#e0000000" ... /> 透明 ...
- Android 设置按钮背景透明与半透明_图片背景透明
Button或者ImageButton的背景设为透明或者半透明 半透明<Button android:background="#e0000000" ... /> 透明 ...
随机推荐
- Objective-C中变量采用@property的各个属性值的含义
我们在OC中定义变量,可以自己来定义变量的setter方法来设置变量值,用getter方法来获取变量值.但是当变量数量增多时,还采用手动添加setter/getter方法来操作变量,就会使得程序代码量 ...
- SWOT分析法
SWOT(Strengths Weakness Opportunity Threats)分析法,又称为态势分析法或优劣势分析法,用来确定企业自身的竞争优势(strength).竞争劣势(weaknes ...
- Understand Rails Authenticity Token
翻译整理自: http://stackoverflow.com/questions/941594/understand-rails-authenticity-token 主要翻译的是第一个回答,另外结 ...
- [Angular 2] Managing State in RxJS with StartWith and Scan
The scan operator in RxJS is the main key to managing values and states in your stream. Scan behaves ...
- rk3288 ov8858 camera移植
平台:瑞芯的rk3288 SDK:4.4/5.0/5.1 作者:fulinux *****本文同意转载.只是请注明出处:http://blog.csdn.net/fulinus**** rk3288的 ...
- Android(java)学习笔记249:ContentProvider使用之获得系统联系人信息01
1.系统联系人的数据库(3张最重要的表) (1)raw_contacts 联系人表 保存联系人的id contact_id (2)data 数据表 保存联系人的数据 ( ...
- linux elinks命令
Elinks是基于文本的免费浏览器,用于Unix及基于Unix的系统.Elinks支持 HTTP,HTTP Cookies以及支持浏览Perl和Ruby脚本.也很好的支持选项卡浏览.最棒的是它支持鼠标 ...
- /etc/motd and /etc/issue
/etc/motd and /etc/issue Bash offers an option to include messages in the /etc/motd and the /etc/iss ...
- C# 面向对象 , 继承
继承 class A { Console.WriteLine("hello world"); } class B:A { } 以上书写,表示B 是A 的子类, B 同时继承A 中 ...
- hdu 2187
#include <stdio.h> using namespace std; struct race { int p; int w; }; race r[1010]; int cmp(r ...