我正在尝试将底部表添加到我的布局中,因此我将所有片段的布局放在 CoordinatorLayout 中:
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools">
<RelativeLayout
android:id="@+id/myOriginalLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:clickable="true">
....
....
</RelativeLayout>
<FrameLayout
android:id="@+id/bottom_sheet"
android:layout_width="match_parent"
android:layout_height="150dp"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
</FrameLayout>
</android.support.design.widget.CoordinatorLayout>
尽管当我尝试扩展布局时,它一直在崩溃,并声明Error inflating class android.support.design.widget.CoordinatorLayout
.