아래 그림과 같이 반투명 상태 표시 줄을 확장하려면 내 탭이있는 툴바의 배경 인 그래디언트를 얻으려고합니다.android는 툴바를 반투명 상태 표시 줄로 확장하면서 시스템 레이아웃에 다른 레이아웃 객체를 유지합니다.
나는 이것을 달성하기 위해 LAYOUT_NO_LIMITS과 TRANSLUCENT_NAVIGATION 플래그를 사용하려고했지만, 도구 모음의 다음 절반은 상태 표시 줄 아래에 간다와 스낵은 탐색 모음에서 이동합니다.
이 현재 레이아웃 파일입니다
<android.support.design.widget.CoordinatorLayout 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/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="software.endeavor.projectg.TabbedActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/appbar_padding_top"
android:theme="@style/AppTheme.AppBarOverlay"
android:background="@drawable/main_gradient">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/main_gradient"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppTheme.PopupOverlay">
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabIndicatorColor="@android:color/white"/>
</android.support.design.widget.AppBarLayout>
<View
android:id="@+id/toolbar_shadow"
android:layout_width="match_parent"
android:layout_height="12dp"
android:layout_below="@id/toolbar"
android:background="@drawable/toolbar_dropshadow" />
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipeContainer"
android:layout_width="368dp"
android:layout_height="495dp">
<android.support.v4.view.ViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@android:drawable/ic_dialog_email" />
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
가 어떻게 아직도 적절한 시스템 레이아웃 경계를 유지하면서 상태 표시 줄에 탭 도구 모음 그라데이션 연장에 대해 갈 것입니다 규칙적인 컬러 네비게이션 바 유지?