listpreference

How to customize list preference radio button

元气小坏坏 提交于 2019-11-26 22:13:40
问题 I have customized all the radioButtons in my application but the radioButtons in the listPreference does not get customized. I have used this xml named btn_radio.xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true" android:state_window_focused="false" android:drawable="@drawable/radio_selected" /> <item android:state_checked="false" android:state_window_focused="false" android:drawable="@drawable

custom row in a listPreference?

跟風遠走 提交于 2019-11-26 16:04:27
I am trying to create a ListPreference but somehow disable one of the items. Sort of like gray it out or something and not have the ability to choose it. It will be an upcoming feature and I want it to be in the list just not selectable. I have created a custom ListPreference class and in that class a custom adapter, hoping to use the adapter to create what I want. The code works, and it sets the adapter, but none of the adapter functions get called. I set breakpoints on the methods, such as getCount() but they never get called. Here's my code. Custom ListPreference taken from http://blog