Android ListView with RadioButton in singleChoice mode and a custom row layout

前端 未结 7 1930
野趣味
野趣味 2020-12-06 04:13

I have a ListView, which is in singleChoice mode. All I want is to display a RadioButton to the side, that when clicked highlights to say i

7条回答
  •  一生所求
    2020-12-06 05:08

    You can achieve much more simple, follow this. It was tried in MarshMallow

    1)Have a CheckedTextView :

    
    

    • ListChoiceIndicatorSingle will display RadioButton.

    • ListChoiceIndicatorMultiple will display CheckBox

    Don't forgot to put choiceMode:Single in your ListView.

提交回复
热议问题