This is what I did to achieve curved status bar on my android application. This created a toolbar that can be over other views so when you scroll views goes under the toolbar.
First I hid the original Toolbar from activity by creating a no title theme and selecting that theme from manifest. Then I created a Titlebar of my own and then by playing with margins and paddings I achieved desired result.
statusbar
sytles.xml:
<style name="Notitle.Theme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowNoTitle">true</item>
</style>
AndroidManifest.xml
<activity
android:name=".MainActivity"
android:theme="@style/AppTheme.NoActionBar"/>
arch.xml:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle"/>
</item>
<item
android:bottom="0dp"
android:left="-100dp"
android:right="-100dp"
android:top="-80dp">
<shape android:shape="oval">
<gradient
android:startColor="#2629fb"
android:endColor= "#2699FB"
android:angle="90" />
</shape>
</item>
</layer-list>
mainActivity.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#27292c">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:contentInsetLeft="0dp"
android:contentInsetStart="0dp"
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
android:contentInsetRight="0dp"
android:contentInsetEnd="0dp"
app:contentInsetRight="0dp"
app:contentInsetEnd="0dp"
android:layout_marginBottom="-50dp"
android:elevation="5dp"
android:background="@drawable/arch">
<TextView
android:id="@+id/headerWidgetTitle"
android:text="Title"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="24sp"
android:paddingTop="10dp"
android:textColor="#FFFFFF"
android:paddingBottom="20dp"/>
</androidx.appcompat.widget.Toolbar>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/scrollLinearLayout"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
android:elevation="0dp"
android:paddingTop="50dp"
android:clipToPadding="false">
<!-- Your Views -->
</LinearLayout>
</ScrollView>