Home >Java >javaTutorial >Solution to the problem of listview not responding when clicked
The following editor will bring you an article on how to deal with invalid listview clicks (recommended). The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let's follow the editor and take a look.
Android's listview, when there are clickable elements in the item, such as checkbox, the focus will be given to the checkbox, and clicking on the item will be invalid.
The solution is to add:
android:descendantFocusability="blocksDescendants"# in the item's xml, the outermost layer
## That’s it. 【Related Recommendations】1.Special Recommendation: "php Programmer Toolbox" V0.1 version download
2. 3.Geek Academy Java Video Tutorial
The above is the detailed content of Solution to the problem of listview not responding when clicked. For more information, please follow other related articles on the PHP Chinese website!