I'm trying to create a shape visible above a BottomNavigationView (BottomSheetDialog peek). Any ideas on how to recreate it in the app?
I've been trying with layer-list which looks fine on the preview but gets flattened while setting it up as a background for a view.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:top="-13dp" android:start="120dp" android:end="120dp">
<shape android:shape="oval">
<solid android:color="@color/turquoise"/>
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@color/turquoise"/>
</shape>
</item>
<item android:drawable="@drawable/ic_bottomsheetdialog_arrow_up"
android:bottom="15dp"
android:start="130dp"
android:end="130dp"
android:top="-10dp"/>
</layer-list>
XML preview:
Drawable applied to the View in the layout
<View android:id="@+id/view_bottomSheetDialog_accentDivider"
android:layout_width="0dp"
android:background="@drawable/drawable_bottom_sheet_dialog"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_height="30dp"/>
I've also been thinking about workarounds such as BottomNavigationView with centered FloatingActionButton, or just 2 views (rectangle + circle shape with icon) centered in ConstraintLayout.
Any pointers on how to do this or code would be really helpful.