Christopher Francisco
Christopher Francisco

Reputation: 16268

Android view to display true/false value

I was wondering of a View to use to display a true/false value graphically (which means no TextView with text "true" or "false"). Obviously the first thought in my mind was to use either CheckBox or Switch but the issue is they don't seem to have any property that makes them "read only". I'm placing them in a details screen so I don't want the user changing it (unless in an edit screen which needs password but that's out of the topic).

Is there any view to represent true/false value or is there any way to make these views unchangeable by touching?

PS: something like the ratingBarStyleIndicator but for true/false

Upvotes: 0

Views: 444

Answers (1)

Emmanuel
Emmanuel

Reputation: 13223

You can still use a CheckBox, ToogleButton or RadioButton. If you want to disallow the user from changing the value just set clickable=false in the View's xml.

Upvotes: 1

Related Questions