私のAndroidコードにはこれがあります
<CheckedTextView
android:id="@+id/rememberMe"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/advancedMenu"
android:layout_below="@+id/logInMode"
android:checkMark="@drawable/bg_checkbox"
android:gravity="center|center_horizontal"
android:text="@string/rememberMe"
android:textColor="#ffffff" />
そしてbg_checkbox
、
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true"
android:drawable="@drawable/checkbox_checked"
android:state_focused="false">
</item>
<item android:state_checked="true"
android:drawable="@drawable/checkbox_checked"
android:state_focused="true">
</item>
<item android:state_checked="false"
android:drawable="@drawable/checkbox"
android:state_focused="false">
</item>
<item android:state_checked="false"
android:drawable="@drawable/checkbox"
android:state_focused="true">
</item>
</selector>
このセレクターは通常のチェックボックスで機能しますが、この場合は機能せず、クリックしてもチェックされていない状態が表示されます。
また、テキストとチェックボックスの間にスペースを入れるにはどうすればよいですか?