4

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!

Narendra Singh
  • 3,990
  • 5
  • 37
  • 78
vlio20
  • 8,955
  • 18
  • 95
  • 180

1 Answers1

11

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

Blackbelt
  • 156,034
  • 29
  • 297
  • 305
ozbek
  • 20,955
  • 5
  • 61
  • 84