这里我想在点击viewstub open时禁用framelayout。从菜单图标和framlayout查看浴缸弹出窗口我变形的片段。 (我有一个解决方案是获取所有视图并且setClickable = false。)
但我正在寻找其他解决方案,比如关注当前视图,以便其他视图被设置为禁用。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:fitsSystemWindows="true"
android:orientation="vertical"
tools:context="com.example.yagneshshinde.thalischedule.menuhome.MainActivity">
<include layout="@layout/toolbar" />
<ViewStub
android:id="@+id/stub_import"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:inflatedId="@+id/content_import"
android:layout="@layout/menu_layout"
android:visibility="gone" />
<ViewStub
android:id="@+id/calander_import"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:inflatedId="@+id/calander_content_import"
android:layout="@layout/calendar_dialog_basic"
android:visibility="gone" />
<LinearLayout
android:id="@+id/frameLayoutLinear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/frameContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:foreground="@drawable/dim_layout">
</FrameLayout>
</LinearLayout>
<!-- <include layout="@layout/content_main" />-->
</LinearLayout>