Hello all, I am trying to build a custom check box, I have an issue creating it. let me first show you files so that you can get better picture of what I am talking about.
1) preference.xml is
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="test_title" >
<com.dc.SeekBarPreference
android:key="@string/Delay"
android:background="#041A37"
android:defaultValue="5"
android:title="Seconds "
android:progressDrawable="@drawable/seekbardrawable"/>
<com.dc.SeekBarPreference2
android:key="@string/Drop_Delay"
android:defaultValue="30"
android:progressDrawable="@drawable/seekbardrawable"
android:title="Seconds "
/>
<CheckBoxPreference android:key="@string/Option"
android:title="drop"
android:defaultValue="true"
android:background="@drawable/android_button"
/>
<CheckBoxPreference
android:key="@string/Timer_Option"
android:title="launch"
android:background="@drawable/android_button"
android:defaultValue="true"/>
</PreferenceCategory>
2)The settings.xml screen where I have check boxes are is:
<TableRow>
<CheckBox android:id="@+id/check2"
android:layout_weight="1"
android:layout_width="wrap_content"
android:background="@drawable/android_button"
android:layout_height="wrap_content" android:text="Start after timer launch" />
3)android_button.xml is:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/android_pressed" /> <!-- pressed -->
<item android:state_focused="true"
android:drawable="@drawable/state_normal" /> <!-- focused -->
<item android:drawable="@drawable/state_normal" /> <!-- default -->
I am unable to inflate the custom images android_pressed,state_normal,state_normal. Any help close to the answer will be appreciated. If you have faced the same issue earlier let me know how you fixed. Thank you very much. If any data is missing that makes question incomplete or confusing let me know I will edit it. I am trying to keep question short and precise.