Reputation: 21
I have a PreferenceActivity
where 3 ListPreferences
are present.
Each ListPreference
has some entries(2 or 3).
I want to show only 1 entry highlighted and the rest greyed out in one of the ListPreference
.
What changes do I need to do in PreferenceActivity
if I change ListPreference to some CustomeListPreference
?
Where do I start? Can anybody help me figure out what to do?
Upvotes: 2
Views: 2765
Reputation: 33509
Since ListPreference
inherts Preference
you should be able to first set setShouldDisableView()
to true. Then, set setEnabled()
to false. This should make the item appear disabled (grey) and not clickable.
Upvotes: 5