天天看點

android設定背景顔色為藍色,改變android中edittext的背景顔色

如果我使用以下代碼更改我的EditText的背景顔色,它看起來像框縮小,并且它不會保留預設EditText存在的藍色底邊框的ICS主題。

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:background="#99000000"

>

android:id="@+id/id_nick_name"

android:layout_marginTop="80dip"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:background="#ffffff"

/>

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:layout_marginTop="10dip"

android:layout_marginLeft="20dip"

android:layout_marginRight="20dip"

android:orientation="horizontal"

android:layout_below="@+id/id_nick_name">

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="add"

android:layout_weight="1"

/>

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="cancel"

android:layout_weight="1"

/>

這是它的樣子: