开发者

handle listview with button

开发者 https://www.devze.com 2023-01-26 17:23 出处:网络
i have a listview and button on the list how can i use both button.setonclicklis开发者_如何学Pythontener and onListItemClick in listview I had the same issue.But while adding button\'s onClick event t

i have a listview and button on the list how can i use both button.setonclicklis开发者_如何学Pythontener and onListItemClick in listview


I had the same issue.But while adding button's onClick event to adapter,it was not able to listen to the list item's click event.so I used image instead of a button and then registered its click event in adapter,and that was working nicely.


Set the button.setOnCLickListener in your getView() method of the adapter.

0

精彩评论

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