更新时间:2023-11-01 20:07:04
您可以在特定的布局设置backgorund颜色(UR选择)
比如你有5个编辑框上面的2 2的下方,1个在中心
谁ü想改变背景颜色U可以做以下
You can set the backgorund colour (ur choice) in the specific layout for example you have 5 edit box 2 above 2 below and 1 in center whom u wanna change the background color u can do the following
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1.0"
android:background="#000000"
android:orientation="vertical"
android:padding="5px" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<EditText
android:id="@+id/id1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<EditText
android:id="@+id/id2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#435232"
android:orientation="horizontal" >
<EditText
android:id="@+id/id3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:digits="0123456789"
android:maxLength="6" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<EditText
android:id="@+id/id4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<EditText
android:id="@+id/id5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:digits="0123456789"
android:maxLength="11" />
</LinearLayout>
</LinearLayout>
正如你可以看到我改变甲肝第三届编辑文本的背景颜色以同样的方式ü也可以做到这一点。
As you can see i hav changed the background colour of 3rd edit text in the same way u can also do that