Android:如何为ListView的列表项中的Button设置onClick事件 [英] Android : How to set onClick event for Button in List item of ListView
本文介绍了Android:如何为ListView的列表项中的Button设置onClick事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想为 Listview
项目中使用的按钮添加 onClick
事件.如何为列表项中的按钮提供 onClick
事件.
I want to add onClick
event for buttons used in item of Listview
.
How can I give onClick
event for buttons in List Item.
推荐答案
您可以在自定义适配器的 getView
方法中设置 onClick
事件..
检查链接 http://androidforbeginners.blogspot.it/2010/03/clicking-buttons-in-listview-row.html
You can set the onClick
event in your custom adapter's getView
method..
check the link http://androidforbeginners.blogspot.it/2010/03/clicking-buttons-in-listview-row.html
这篇关于Android:如何为ListView的列表项中的Button设置onClick事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文