У меня есть RelativeLayout
и вы хотите отключить любые трогательные события для нижнего слоя, однако поставить android:clickable="true"
на верхний уровень не делает трюк. Не могли бы вы взглянуть:android: clickable не работает
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="lower layer button" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="upper layer button"/>
</RelativeLayout>
</RelativeLayout>
Я все еще могу нажать обе кнопки. Что может быть неправильным с этой частью кода?
Отредактировано, чтобы сделать вопрос более четким.