问题
I am facing little problem in my android app. When i open my android app in new notched android devices, There is a blank space at bottom of the app displaying the text "Display in this area" as shown in the screenshot.
Here is main xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:background="#fffafafa"
android:fitsSystemWindows="true"
android:scrollbars="none"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/main_content"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<android.support.design.widget.AppBarLayout
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:id="@+id/appbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="?actionBarSize"
app:layout_scrollFlags="enterAlways|scroll">
<android.support.v7.widget.Toolbar
</FrameLayout>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/frame_content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/appbar"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.NavigationView
android:layout_gravity="start"
android:id="@+id/nav_view"
android:background="#fff8f8f8"
android:fitsSystemWindows="true"
android:scrollbars="none"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
app:menu="@menu/menu_drawer"
app:itemIconTint="@color/colorPrimaryLight"
app:itemTextColor="#424242"
app:itemTextAppearance="@style/TextAppearance.AppCompat.Medium"
app:headerLayout="@layout/nav_header"
app:theme="@style/DrawerStyle"/>
</android.support.v4.widget.DrawerLayout>
来源:https://stackoverflow.com/questions/61057784/app-showing-display-in-this-area-while-opening