CoordinatorLayout and align button relative to BottomSheet

I want to create Button which will move together with BottomSheet. It should be positioned above BottomSheet parent. So I used CoordinatorLayout to achieve this. But if I anchor this Button above BottomSheet layout, its bottom half is cut off (I want to position it above BottomSheet layout like in RelativeLayout). Also if BottomSheet is hidden, its overlapping TabBar. Also Button is for some reason not following BottomSheet. I thought CoordinatorLayout would solve this issue. I dont wanna hand animate Button movement based on BottomSheet peek.

<androidx.coordinatorlayout.widget.CoordinatorLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:orientation="vertical"
        tools:ignore="UselessParent">

        <ImageButton
            android:id="@+id/but_location"
            android:layout_width="@dimen/button_height"
            android:layout_height="@dimen/button_height"
            android:layout_margin="@dimen/padding_medium"
            app:layout_anchor="@id/bottomSheetContainer"
            app:layout_anchorGravity="end|top"
            android:src="@drawable/ic_location_icon"
            style="@style/button.shadow" />

        <RelativeLayout
            android:id="@+id/bottomLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <include
                android:id="@+id/bottomSheetContainer"
                layout="@layout/bottom_sheet_container"
                android:layout_width="match_parent"
                android:layout_height="200dp"
                android:layout_above="@id/tabBar" />

            <include
                android:id="@+id/tabBar"
                layout="@layout/tab_bar_layout"
                android:layout_alignParentBottom="true"
                android:layout_width="match_parent"
                android:layout_height="66dp" />

        </RelativeLayout>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

UI:

enter image description here

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum