michalt38
michalt38

Reputation: 1193

CheckBoxPreference not checking when clicking on it

Is it possible to make CheckBoxPreference not selecting by clicking on it but only programically?

Upvotes: 0

Views: 65

Answers (1)

Thracian
Thracian

Reputation: 66674

Use android:selectable="false" or android:enabled="false" in XML. Using android:enabled="false" also grays out the CheckBoxPreference. You can use setEnabled() or setSelectable() if you get CheckBoxPreference instance programmatically.

Upvotes: 1

Related Questions