2017-12-24 28 views
2

내 앱에서 이상한 문제가 발생했습니다. 이미지 뷰가 android:fitsSystemWindows="true"이고 상태 표시 줄 뒤에 나타나길 원합니다.이미지보기의 백그라운드 및 src 속성의 동작이 다릅니다.

android: background을 사용하면 아래와 같이 예상대로 올바르게 작동합니다.

enter image description here

을 [상태 표시 줄에 파란색 배경을 공지]하지만 src 속성을 사용하는 경우, 그것은 상태 표시 줄 뒤에하지 않습니다.

enter image description here

오전 내가 모르는 뭔가가? 도움을 주시면 감사하겠습니다.

여기 내 활동 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> 
+0

시도 화면의 바깥 쪽을 연장 할 수 있도록, 동일한 문제 –

+0

테마 창 translucentstatus의 사실 또는 거짓? –

+0

사실이지만, 시도했거나 시도했지만 동일 문제가 지속됩니다. –

답변

0

시도 :FLAG_LAYOUT_NO_LIMITS는 IT 창은

Window window = getWindow(); 
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); 
+0

좋아요,이 방법이 효과적 이었지만 상태 표시 줄에서 도구 모음을 가져 왔습니다. :( –

+0

okk, 나는 그것을 얻었다 고 생각한다, 그냥 모든 안드로이드를 제거한다 : fitsSystemWindows = "true"제외 imageview –

+0

아니, 작동하지 않았다, 나는이 문제에 대해 더 연구해야 할 것이다. –