2011.09.01——— android 透显然示

2011.09.01——— android 透明显示
2011.09.01——— android 透明显示
参考:http://zhangkun716717-126-com.iteye.com/blog/814739
http://tracyhuyan.iteye.com/blog/710591


设置透明效果 大概有三种


1、用android系统的透明效果
android:background="@android:color/transparent"


例如 设置按钮
<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来控制

半透明<Button android:background="#e0000000" />
透明<Button android:background="#00000000" />



3、设置alpha

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