0

내 응용 프로그램을 실행할 때. 내 상태 표시 줄 배경색이 이상 함. 왜 이런 일이 일어날 지 모르겠다. 당신이 최고에 Gradient 유형과 같은 검은 그림자 컬러 디스플레이를 볼 수있는StatusBar 색상이 Kitkat에서 이상 함

enter image description here

.

이 장치는 Kitkat 버전이므로 색상이 표시됩니다.

이 버그인가요? 도움을 주시면 감사하겠습니다.

layout_login.xml

<?xml version="1.0" encoding="utf-8"?> 
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 
    <ScrollView 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:fillViewport="true"> 
     <RelativeLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:background="@color/white1" 
      app:layout_behavior="@string/appbar_scrolling_view_behavior"> 
      <ImageView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_marginTop="@dimen/normal_margin40" 
       android:id="@+id/imageView_logo" 
       android:src="@drawable/gargi_logo" 
       android:layout_centerHorizontal="true" /> 
      <android.support.design.widget.TextInputLayout 
       android:id="@+id/textinputLayout_username" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="@dimen/normal_margin40" 
       android:layout_marginRight="@dimen/normal_margin40" 
       android:layout_marginTop="@dimen/normal_margin50" 
       android:layout_below="@+id/imageView_logo"> 
       <android.support.design.widget.TextInputEditText 
        android:id="@+id/login_username_editText" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:hint="@string/username" 
        android:singleLine="true" 
        android:focusable="true" 
        android:focusableInTouchMode="true" 
        android:inputType="textPersonName" /> 
      </android.support.design.widget.TextInputLayout> 
      <android.support.design.widget.TextInputLayout 
       android:id="@+id/textinputLayout_password" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="@dimen/normal_margin40" 
       android:layout_marginRight="@dimen/normal_margin40" 
       android:layout_below="@+id/textinputLayout_username" 
       android:layout_marginTop="@dimen/normal_margin5"> 
       <android.support.design.widget.TextInputEditText 
        android:id="@+id/login_password_editText" 
        android:layout_height="wrap_content" 
        android:layout_width="match_parent" 
        android:hint="@string/password" 
        android:singleLine="true" 
        android:inputType="textPassword" /> 
      </android.support.design.widget.TextInputLayout> 
      <Button 
       android:id="@+id/login_button" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_below="@+id/textinputLayout_password" 
       android:theme="@style/AppTheme.Button" 
       android:text="@string/login" 
       android:textStyle="bold" 
       android:textColor="@color/white1" 
       android:gravity="center" 
       android:padding="2dp" 
       android:layout_marginTop="@dimen/normal_margin5" 
       android:layout_marginLeft="@dimen/normal_margin40" 
       android:layout_marginRight="@dimen/normal_margin40" /> 
      <TextView 
       android:id="@+id/txt_forgetpassword" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_below="@+id/login_button" 
       android:text="@string/forget_password" 
       android:textColor="@color/colorPrimary" 
       android:gravity="center_horizontal" 
       android:layout_marginTop="@dimen/normal_margin10" /> 
      <TextView 
       android:id="@+id/signUp_textView" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:textColor="@color/colorPrimary" 
       android:text="@string/register_now" 
       android:gravity="center_horizontal" 
       android:layout_marginBottom="@dimen/normal_margin10" 
       android:layout_alignParentBottom="true" /> 
     </RelativeLayout> 
    </ScrollView> 
</android.support.design.widget.CoordinatorLayout> 

styles.xml

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 
     <item name="colorPrimary">@color/colorPrimary</item> 
     <item name="colorPrimaryDark">@color/colorPrimaryDark</item> 
     <item name="colorAccent">@color/colorAccent</item> 
    </style> 

    <style name="AppTheme.NoActionBar"> 
     <item name="windowActionBar">false</item> 
     <item name="windowNoTitle">true</item> 
     <item name="android:titleTextStyle">@style/myTheme.ActionBar.Text</item> 
    </style> 

그리고 이것은 LoginActivity 그래서 나는이 주제

AppTheme.NoActionBar

을 사용하여 내 617,451,515,

업데이트 : 새로운 Google Kitkat으로 장치를 만든

같은 결과

enter image description here

+0

상태 표시 줄의 색상은 Kitkat에서 변경할 수 없습니다. – Nithinlal

+0

@Nininlal 왜 '그래디언트'유형의 색상과 '최상위'표시인지. – Ironman

+0

어떤 전화를 사용하고 있는지 확인하고, 모든 응용 프로그램이 동일한 색상 상태 표시 줄을 가지고 있는지 확인하십시오. 그렇다면 해당 주제 문제 – Nithinlal

답변

1

상태 표시 줄에 운영 체제가 소유 한 시스템 창입니다을 표시합니다. 5.0 이전 버전의 Android 장치에서는 응용 프로그램에 색상을 변경할 수있는 권한이 없으므로 AppCompat 라이브러리가 이전 플랫폼 버전을 지원할 수있는 것이 아닙니다. AppCompat가 할 수있는 최선의 방법은 응용 프로그램 내에서 ActionBar 및 다른 일반적인 UI 위젯을 채색하는 것입니다.

+0

필자는 왜 '그라디언트'유형의 색상과'Top' 디스플레이가 있는지 알고 있습니다. – Ironman

0

콘텐츠에서 가장 큰 영향을 받기 위해 새로운 창 스타일과 테마를 사용하여 상태 표시 줄과 탐색 모음을 포함하여 반투명 시스템 UI를 요청할 수 있습니다. 탐색 모음 단추 또는 상태 표시 줄 정보의 가독성을 보장하기 위해 미묘한 그라디언트가 시스템 표시 줄 뒤에 표시됩니다. 일반적인 유스 케이스는 배경 화면을 통해 보여줘야하는 앱입니다. - 이유;)