Ok I have a very simple and yet difficult question.
I have 10 checkboxes, all called 'check', each one has a unique id from 1 - 10.
When I press a button on my app I want to be able to tell which checkboxes are checked and which aren't.
I'm sure the answer is very simple but I can't think of how I can do this. I have the code for the button, I can't work out how to check each checkbox by id when they are all called 'check'. Hopefully one of you guys can help me out. Are the checkboxes explicitly created in the activity main layout, e.g. 10 checkboxes in the XML, or are they dynamically create, e.g. in a row layout that is used multiple times in a ListView?
以上就是Android - Find Item By ID的详细内容，更多请关注web前端其它相关文章！