android 组建添加透明度

给TextView添加透明度,起初用的方法是android:alpha = "0.3"  添加后,文字显示也有点透明发虚,后来改成设置background,然后


background       xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">


    <solid android:color="#a0323232" />    a0为透明度   323232  为颜色值  即可
    
    <corners android:radius="3dp" />


</shape>
    
    <corners android:radius="3dp" />


</shape>

posted @ 2015-09-08 11:45  你好and程序员  阅读(242)  评论(0编辑  收藏  举报