设置透明效果 大概有三种:
1、用android系统的透明效果
Java代码
android:background="@android:color/transparent"

例如 设置按钮
Java代码
<Button android:background="@android:color/transparent"

android:text="@+id/Button01"

android:id="@+id/Button01"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:textColor="#ffffff" />

2、用ARGB来控制
Java代码
半透明<Button android:background="#e0000000" />
透明<Button android:background="#00000000" />
3、设置alpha Java代码
View v = findViewById(R.id.content);//找到你要设透明背景的layout 的id
v.getBackground().setAlpha(100);//0~255透明度值

更多相关文章

  1. Android基本界面元素的使用与讲解
  2. Android设置透明、半透明等效果
  3. Android布局背景颜色设置
  4. Android高手进阶教程(七)之----Android(安卓)中Preferences的使
  5. textView 和 edittext 的一些属性
  6. TextView 实现跑马灯效果
  7. 转:善用Android预定义样式来为我们的布局设置效果,大大节约代码量
  8. Android软键盘弹出,界面整体上移
  9. 关于android avd目录的设置

随机推荐

  1. Android(安卓)和风天气SDK获取天气
  2. 2010.10.28———Android 02
  3. 【Android】FadingEdge
  4. 解读Android(安卓)3.2的新特性
  5. AndroidManifest.xml中一些权限配置
  6. Android NDK应用开发
  7. android和Myeclipse搭建环境
  8. 安卓设置文字自动滚动
  9. Cordova 3.x 源码分析(6) -- cordova.js本
  10. Android支持不同的密度或分辨率