The bottom navigation bar hides part of the view

In my application, I want to display a simple picture,

On my Samsung Galaxy S7 real device, the image is very good. The navigation bar at the bottom is not part of the view, but part of the phone itself. There is the whole image

On the Android emulator, the bottom navigation bar is part of the view, and the image is partially hidden

This is my simple linear layout

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout         
    xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:fitsSystemWindows="true"
          android:background="@color/md_blue_50"
          android:orientation="vertical">

    <include
        android:id="@+id/app_bar"
        layout="@layout/toolbar"/>

    <ImageView
        android:id="@+id/photo_image_large"
        android:adjustViewBounds="true"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="fill_vertical"
        android:scaleType="fitXY"/>

</LinearLayout>

This is a screenshot of the Android emulator

android emulator

This is a screenshot of my Samsung Galaxy Real device

android real device

The problem also appears in the collector view of the application. The bottom of the image is truncated on the Android Simulator

resolvent:

This is because Android: fitsystemwindows sets it to false and should be fine

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>