vlio20
vlio20

Reputation: 9295

how to make layout clickable programmatically

I am creating a RelativeLayout programmatically, and thus, I need to add this xml attribute: android:clickable="true" programmatically.

How can this be done? thanks!

Upvotes: 5

Views: 5712

Answers (1)

ozbek
ozbek

Reputation: 21183

you have to use setClickable(true). See the docs

Upvotes: 12

Related Questions