Reputation: 9295
I am creating a RelativeLayout programmatically, and thus, I need to add this xml attribute: android:clickable="true" programmatically.
android:clickable="true"
How can this be done? thanks!
Upvotes: 5
Views: 5712
Reputation: 21183
you have to use setClickable(true). See the docs
setClickable(true)
Upvotes: 12