Android 底板触摸区占据整个屏幕
我已经添加了一个底部的工作表和我的视图,它工作正常,但我可以拖动工作表的触摸区域占据了整个屏幕。 视图代码如下所示Android 底板触摸区占据整个屏幕,android,bottom-sheet,Android,Bottom Sheet,我已经添加了一个底部的工作表和我的视图,它工作正常,但我可以拖动工作表的触摸区域占据了整个屏幕。 视图代码如下所示 <android.support.design.widget.AppBarLayout android:id="@+id/app_bar" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="tru
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:transitionName="@string/transition_image">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:contentScrim="@color/color_primary"
app:expandedTitleMarginEnd="64dp"
app:expandedTitleMarginStart="48dp">
<com.oxzimo.fabric.ui.DetailsImageView
android:id="@+id/backdrop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:scaleType="centerCrop"
app:layout_collapseMode="parallax" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#fff"
android:elevation="6dp"
app:behavior_peekHeight="56dp"
app:layout_behavior="@string/bottom_sheet_behavior">
<include layout="@layout/item_detail" />
</FrameLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin"
android:clickable="true"
android:visibility="gone"
android:elevation="10dp"
android:src="@drawable/ic_wallpaper_white_24dp"
android:contentDescription="@string/content_desc_set_wallpaper"
app:layout_anchor="@id/bottom_sheet"
app:layout_anchorGravity="top|right|end" />
</android.support.design.widget.CoordinatorLayout>
我想知道为什么会出现这种行为,以及如何使触摸区域仅包括底部纸张。主要是因为
@layout/item\u detail
。但是你没有把它包括在你的问题中,你是说include做了这种行为吗?我是说你的布局可能会包括在内。主要是因为@layout/item\u detail
。但你们并没有把它包括在你们的问题中,你们的意思是“包括”正在做出这种行为吗?我是说你们所包括的布局可能会。