0

Like this

I want to set focusable and clickable mode for LinearLayout (like in above image). How to I make this?

Taha Körkem
  • 774
  • 2
  • 9
  • 23

2 Answers2

1

try this, it worked for me

<LinearLayout android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"
              android:clickable="true"
              android:focusable="true"
              android:background="?android:attr/selectableItemBackground">
</LinearLayout>
Jack Wilsdon
  • 6,706
  • 11
  • 44
  • 87
0

In the XML file that you defined, you can have in your element:

android:focusable="true"

or

android:clickable="true"

heavyweight
  • 88
  • 2
  • 8