开发者

How to custom checkbox in listview to check only one like radio button

开发者 https://www.devze.com 2023-03-26 16:34 出处:网络
I have list which contain checkbox in each list and I want to define these checkbox for only one of check box can select (like radio 开发者_开发知识库button) anybody have any ideas?Set clickable/focus

I have list which contain checkbox in each list and I want to define these checkbox for only one of check box can select (like radio 开发者_开发知识库button) anybody have any ideas?


Set clickable/focusable/focusableInTouchMode to false, and then the list item vill receive the click, then set the checkbox state manually. If the checkbox is clickable, then the item will not receive any event, this is an old Android bug still not fixed. Even worse if you want to use EditTexts, but don't get me there

0

精彩评论

暂无评论...
验证码 换一张
取 消