android dynamic layout with variable textviews and events
I have a layout with dynamic content. It has a variable number of textviews. On each textview I have to attach an event, a click event.
I have to pass to that event some kind of开发者_Go百科 information to know what textview has been clicked exactly.
How can I pass this kind of information or how is the android way to do it?
Thanks
The onClick(View v)
callback has View v
on which you can do .getId()
on. This gives you information about which of the textViews that was clicked.
精彩评论