
I want to set focusable and clickable mode for LinearLayout (like in above image). How to I make this?
试试这个,它对我有用
<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>
在您定义的 XML 文件中,您可以在元素中包含:
机器人:焦点=“真”
或者
安卓:可点击=“真”