0

I need to change the check and uncheck icon in my preferenceScreen, I already have tried many ways, but all of them have failed, on my last attemp I have added one more check box beside of the default

example image

my prefence.xml

<?xml version="1.0" encoding="utf-8"?>

<PreferenceCategory
    android:key="verbet"
    android:layout="@xml/category_preference_style"
    android:title="@string/verbetsContent" >
    <CheckBoxPreference
        android:key="noExample"
        android:widgetLayout="@xml/checkbox_preference_style"
        android:title="@string/noExample" />       
</PreferenceCategory>

my checkbox_preference_style.xml

<?xml version="1.0" encoding="utf-8"?>
<CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+android:id/checkbox"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_vertical"
    android:layout_marginRight="4dip"
    android:background="@drawable/preference_checkbox"
    android:clickable="false"
    android:focusable="false" />

I alreay have tried to use android:layout, but the result was I can't change him either

I just want to change the default checkBox ico (that with a blue cheked ico),

any solution?

user3672263
  • 283
  • 1
  • 3
  • 10
  • I don't know if there are any other solutions, but what about creating a normal ImageButton, and use it programmatically as a checkbox (changing the background on click)? – Ruocco Jun 06 '15 at 00:47
  • thas't my last solution, if there's no way to do it, I 'll do that, but need to be a way. – user3672263 Jun 06 '15 at 08:06

0 Answers0