을 중복, 그 레이아웃 코드는 다음과 같습니다도구 모음 내가 도구 모음이 활동에서 반투명 상태 표시 줄
<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>
나는 유래의 모든 답변을 테스트하지만 그들은 문제를 해결할 수 없습니다.
AppBarLayout 테마는 'app : theme = "@ style/AppTheme.AppBarOverlay"'이어야하며 스타일' Android : fitsSystemWindows = "true"'Top 선형 레이아웃에 추가하십시오. –
@AbhishekSingh Andorid studio says : 주어진 이름과 일치하는 리소스가 없습니다 ('theme'값 '@ style/AppTheme.AppBarOverlay'). – hosseinAmini
또한 덧글에 귀하의 질문에 대한 답변을 추가했습니다. –