I cannot configure my checkbox, although I defined the background in the xml preferences file, it does not pull out the file. 1. I am trying to display custom images for a checkbox and defined the xml selector as "android_button.xml", which looks like this:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checkable="true" android:drawable="@drawable/state_normal" /> <item android:state_checked="true" android:drawable="@drawable/android_pressed" /> <item android:drawable="@drawable/state_normal" /> </selector>
state_normal and android_pressed are two .png images in the res> drawable folder.
2.my file checkbox preference.xml:
<CheckBoxPreference android:key="@string/Drop_Option" android:title="Close after call drop" android:defaultValue="true" android:background="@drawable/android_button" />
Is there any error in the definition. The only change that appears on the screen is android: the title text, if I change the text, it changes the text. Nothing else changes. How to fix it. Thank you for your suggestion.
android android-emulator android-manifest
David Prun Aug 25 '10 at 19:15 2010-08-25 19:15
source share