how to make layout clickable programmatically
Asked Answered
S

1

5

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!

Syncom answered 16/5, 2013 at 17:35 Comment(0)
E
12

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

Earmark answered 16/5, 2013 at 17:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.