xml file
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
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:background="#666666"
>
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/first"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="MissingConstraints">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/topAppBar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:title="Screen stream"
style="@style/Widget.MaterialComponents.Toolbar.Primary"
/>
</com.google.android.material.appbar.AppBarLayout>
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bottomsheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:backgroundTint="#FF0000"
app:fabAlignmentMode="end"
app:fabCradleMargin="10dp"
app:fabCradleRoundedCornerRadius="30dp"
app:fabCradleVerticalOffset="15dp"
app:menu="@menu/mst"
tools:ignore="BottomAppBar" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/download"
android:backgroundTint="#5384D8"
app:layout_anchor="@id/bottomsheet"
android:contentDescription="TODO" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Errors
I tried this two answer but same error
1.failed-to-find-attr-textappearancecaption-in-current-theme
2.an-anchor-may-not-be-changed-after-coordinatorlayout-measurement-begins-before-l
1. Render error
Failed to find '@attr/textAppearanceHeadline6' in current theme.
Tip: Try to refresh the layout.
2. Render error
java.lang.IllegalStateException: An anchor may not be changed after CoordinatorLayout measurement begins before layout is complete.
How can I solve this errors?