How do I make the Checkbox in Android CheckedTextView be left aligned instead of right aligned?

后端 未结 11 2370
悲哀的现实
悲哀的现实 2020-12-09 14:54

I am trying to use R.layout.simple_list_item_multiple_choice with ListView. CheckedTextView is used in simple_list_item_multiple_choice.xml, but how can I make the checkbox

11条回答
  •  旧巷少年郎
    2020-12-09 15:12

    If you want the checkbox to be on the left, simply just use a CheckBox. Maybe it is not matter of course, but a CheckBox can contain text. You can define that text by adding an XML attribute android:text, or by calling the setText() method. Actually CheckBox is inherited from Button, which inherits from TextView, that's why it has all the text-related properties.

提交回复
热议问题