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

后端 未结 11 2391
悲哀的现实
悲哀的现实 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:27

    I don't think you can. Looking at the source code, it seems like the checkmark is drawn on the right all the time. And, to be honest, I would recommend you stick with that, for consistency -- Android gets knocked all the time because its apps have inconsistent UIs.

    In the off chance that somebody is pointing a gun at your head, forcing you to change the placement of the checkmark, subclass CheckedTextView as OMGPleaseDontShootCheckedTextView, and override methods like onDraw(), with tweaked versions of the original that changes the placement of the image and text.

提交回复
热议问题