Changing focus from Button in ListView row to list item

雨燕双飞 提交于 2019-12-14 00:26:06

问题


I have a ListView with list items that have a Button on them. You can no longer select the list item, only the Button on the list item. How do you change the focus back to the list item?


回答1:


For the Button in your list row layout add the attribute:

android:focusable="false"


来源:https://stackoverflow.com/questions/9572990/changing-focus-from-button-in-listview-row-to-list-item

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!