设置透明效果 大概有三种:
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. TextView 实现跑马灯效果
  2. 转:善用Android预定义样式来为我们的布局设置效果,大大节约代码量
  3. android实现图片平铺效果&WebView多点触控实现缩放
  4. Android基于TextView实现跑马灯效果
  5. 在EeePC上运行Android!(转)(也是代码下载配置编译的流程!)
  6. android上dialog横屏下实现全屏效果
  7. Marquee 跑马效果
  8. -Android各版本系统源代码下载
  9. 设置TextView文字居中,代码实现android:layout_gravity

随机推荐

  1. 使用Criteria确定android location provi
  2. Android(安卓)O media difference(add HID
  3. 编译android源码的过程
  4. Android标准调用播放器流程
  5. Android_ActionBar
  6. Android(安卓)bluetooth low energy (ble
  7. Android特殊字体的处理---加下划线等
  8. 编译android sdk时的出错out/host/linux-
  9. android点击一个Button打开另外一个activ
  10. Android(安卓)OTG U盘文件读写