私のアプリではこの奇妙な問題が発生しています。私はandroid:fitsSystemWindows="true"
と画像ビューを持って、それがステータスバーの後ろに来てほしい。画像ビューのバックグラウンドとsrc属性の動作が異なります
android: background
を使用すると、次のように正しく動作します。
[ステータスバーに青色の背景に気づく]しかし、私はsrc属性を使用する場合、それは、ステータスバーの後ろに行きません。
私は何かが足りないのですか?ヘルプは高く評価されます。
ここは自分のアクティビティ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>
を外部に拡張することができ、あなたのテーマのウィンドウtranslucentstatusで同じ問題 –
が真か偽である、試してみました? –
それは本当ですが、それを試しても試してみても同じ問題が残る –