我掙扎着一個小問題,我的問題是我在設計部分使用透明的編輯文本視圖,在4.2版本Android設備看起來不錯,很好,如果我檢查2.3版本及以下版本中顯示黑色編輯文本的相同編輯文本。這是我的編輯文本代碼。透明編輯文本視圖是不同的2.3版本和4.2版本
<EditText android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dip"
android:layout_weight="1"
android:alpha="0.3"
android:background="@drawable/reg_edittext"
android:ellipsize="end"
android:ems="10"
android:lines="1"
android:scrollHorizontally="true"
android:singleLine="true"
android:textColor="#ffffff" />
這裏是我的reg_edittext
<?xml version="1.0" encoding="utf-8"?>
<!-- res/drawable/rounded_edittext.xml -->
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:padding="10dp" >
<solid android:color="#000000" />
<corners android:bottomRightRadius="5dp"
android:bottomLeftRadius="5dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp"/>
</shape>
顯示在2.3版中的黑色編輯文本,在4.2呈現透明。回答我,我想查看相同的透明的2.3版本