Is there a way to draw under the status bar but not the navigation bar?
Currently I am using getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
but it also draws under the navigation bar aswell as the status bar.
I have tried this answer but it doesn't allow me to draw under the status bar.
This is my activity_main.xml if it helps. I am putting my fragments in the container frame layout.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/container"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
</FrameLayout>
<LinearLayout
android:id="@+id/bottomBar"
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal"
android:paddingLeft="15dp"
android:paddingRight="15dp">
<ImageButton
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#00FFFFFF"
android:padding="11dp"
android:scaleType="fitCenter"/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#00FFFFFF"
android:padding="11dp"
android:scaleType="fitCenter"/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#00FFFFFF"
android:padding="11dp"
android:scaleType="fitCenter"/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#00FFFFFF"
android:padding="11dp"
android:scaleType="fitCenter"/>
</LinearLayout>
</LinearLayout>