在下面的UI中,我让下面的内容可拖动,覆盖整个屏幕。LinearLayout是透明的,并且允许它下面的控件是可点击或可触摸的。基本上,我可以滚动此LinearLayout下面的列表以及单击控件。我如何禁用它?
请参阅附加的示例。
谢谢
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rlExtNavbar"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="fill_vertical"
android:layout_gravity="fill_vertical"
android:background="@color/transparent" xmlns:tools="http://schemas.android.com/tools" tools:ignore="Overdraw">
<RelativeLayout
android:id="@+id/expandedNavbarLayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</RelativeLayout>
<LinearLayout
android:id="@+id/transparentLayout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/expandedNavbarLayout"
android:focusableInTouchMode="false"
android:focusable="false"
android:background="@color/fulltransparent">
</LinearLayout>
</RelativeLayout>
https://stackoverflow.com/questions/10129092
复制相似问题