0
當我從xml中更改複選框的按鈕時,複選框不會反映已選中的選項。 我的XML文件是:複選框未選中
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/memberName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="57.56"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000000"/>
<CheckBox
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@drawable/checkbox" <----- change button of checkbox
/>
@繪製/複選框png文件
是什麼'@繪製/ checkbox'?是一個PNG文件或XML選擇器? IT應該是後者的條目,用於選中和取消選中。如果它發佈它的代碼。 – FoamyGuy
@ drawable /複選框?是PNG文件 –