开发者

how to set onClickListener to item in ArrayAdapter?

I know what's setOnItemClickListener, but It set the listen to whole item. If m开发者_如何学JAVAy item contains a button to which I want to set listener, setOnItemClickListener doesn't help. I tried set listener in getView, but in vain.


Check this post for a nice solution: http://androidforbeginners.blogspot.com/2010/03/clicking-buttons-in-listview-row.html

(it actually works for any View: http://developer.android.com/reference/android/view/View.html#attr_android:onClick)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜