I'm building an Android App that has many many TextViews that I want to be clickable.
I've tried to assign the properties android:clickable="true"
and android:onClick="clickHandler"
to the single TextView
and when the app fires the clickHandler(View v)
I get the clicked item correctly through v.getId()
.
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.