1.在XML中设置 TextView为例
<TextView
android:background="@android:color/transparent"
/>
2.代码控制
View v=实例化;
v.getBackground().setAlpha(255);//透明度0~255透明度值 ,值越小越透明
3.ARGB方式
<pre name="code" class="html"><TextView
android:background="#00000000"
/>
这种方式为全透明形式。
<TextView
android:background="#e0000000"
/>
这种方式为半透明形式。