2017-02-08 14 views
0

을 중복, 그 레이아웃 코드는 다음과 같습니다도구 모음 내가 도구 모음이 활동에서 반투명 상태 표시 줄

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical" 
    tools:context="com.aminiam.moviekade.fragment.AllReviewFragment"> 

    <android.support.design.widget.AppBarLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:fitsSystemWindows="true" 
     android:theme="@style/AppTheme"> 

     <android.support.v7.widget.Toolbar 
      android:id="@+id/toolbar" 
      android:layout_width="match_parent" 
      android:layout_height="?attr/actionBarSize" 
      android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" /> 

    </android.support.design.widget.AppBarLayout> 

    <android.support.v7.widget.RecyclerView 
     android:id="@+id/recReview" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_below="@+id/toolbar"/> 

</LinearLayout> 

내가 내 응용 프로그램에 투명 상태 표시 줄을 갖고 싶어 내가 활동 테마, 도구 모음에 <item name="android:windowTranslucentStatus">true</item>를 추가 할 때 상태 표시 줄과 겹칠 것입니다.

값-V21의 style.xml는 :

<resources> 
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar"> 
    <!-- Customize your theme here. --> 
    <item name="colorPrimary">@color/colorPrimary</item> 
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item> 
    <item name="colorAccent">@color/colorAccent</item> 
    <item name="android:windowBackground">@color/windowBackground</item> 
</style> 

<style name="TransparentStatusBar" parent="AppTheme"> 
    <item name="android:windowTranslucentStatus">true</item> 
</style> 

나는 유래의 모든 답변을 테스트하지만 그들은 문제를 해결할 수 없습니다.

enter image description here

+0

AppBarLayout 테마는 'app : theme = "@ style/AppTheme.AppBarOverlay"'이어야하며 스타일'