Clickable TextView in Android

Posted by Cris on Stack Overflow See other posts from Stack Overflow or by Cris
Published on 2011-01-06T09:14:10Z Indexed on 2013/10/31 21:55 UTC
Read the original article Hit count: 221

Filed under:
|

i'm building an Android App that has many many TextView that i want to be clickable. I've tried to assign to the single TextView the properties android:clickable="true" and android:onClick="clickHandler" and when the app fires the clickHandler(View v) i correctly get, through the v.getId(), the clicked item. What i don't like is to define, for every TextView, the properties android:clickable and android:onClick ... is there something that i can do by code to say: "all the textviews are clickable and click is handled in 'clickHandler' ?"

Thanks and greetings c

© Stack Overflow or respective owner

Related posts about android

Related posts about textview