Ich habe dieses seltsame Problem in meiner App passiert. Ich habe Bildansicht mit android:fitsSystemWindows="true"
und will es hinter der Statusleiste kommen.Unterschiedliches Verhalten von Hintergrund und src Attribut der Bildansicht
Wenn ich android: background
verwende, funktioniert es ordnungsgemäß wie erwartet, wie unten gezeigt. [Bemerken blauen Hintergrund in der Statusleiste]
Aber wenn ich src-Attribut verwenden, ist es nicht hinter der Statusleiste gehen.
bin ich etwas fehlt? Hilfe wird geschätzt.
Hier ist meine Aktivität XML.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<ImageView
android:id="@+id/full_background"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:scaleType="centerCrop"
android:contentDescription="full_background"
tools:ignore="HardcodedText" />
<include
layout="@layout/app_bar_activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/nav_header_activity_main"
app:menu="@menu/activity_main_drawer" />
</android.support.v4.widget.DrawerLayout>
versucht, das gleiche Problem –
in Ihrem Thema Fenster translucentstatus wahr oder falsch zu verlängern ?? –
Es ist wahr, aber mit oder ohne es versucht, das gleiche Problem besteht aus –