내비게이션 서랍이있는 내 앱에 Material Design을 구현합니다. Nav의 모든 구현이 다릅니다. 머티리얼 디자인을 포함한 서랍 및 툴바 (see this post); 앱을 ICS/Halo 디자인과 비슷한 느낌으로 유지하고 툴바 아래에서 탐색 드로어를 슬라이드 아웃하도록 선택했습니다. 문제는 탐색 함이 열려있을 때 툴바가 나머지 활동과 마찬가지로 그림자와 함께 어두워지는 것입니다. 툴바를 어둡게 유지하는 방법은 무엇입니까? 위에 링크 된 게시물의 이미지를 보면 # 6, 3 또는 5 이후이지만 # 9와 비슷한 모양이되었습니다.탐색 서랍이 열려있을 때 툴바에서 그림자 제거 - 재질 디자인 지원 라이브러리
예 (위의 포스트에서) :
내가 (도구 모음에서 그림자) 후있어 무엇 :
나는 현재 (탐색 서랍이 열려있을 때 도구 모음이 어두워) 무엇을 얻을 : 여기
내 주요 활동의 XML 코드입니다 :그 ID 'container'
인 <FrameLayout>
내 모든 단편이 팽창되는 경우, 그리고 콘텐츠가 툴바 아래 것이 너무가 marginTop
가 툴바의 높이로 설정하는 것이되는 주목할 부분
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
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:context="com.funkhaus.navdrawer.app.MainActivity">
<!-- As the main content view, the view below consumes the entire
space available using match_parent in both dimensions. -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- We use a Toolbar so that our drawer can be displayed
in front of the action bar; Added for Material Design -->
<android.support.v7.widget.Toolbar
android:id="@+id/my_awesome_toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary" />
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize" />
</FrameLayout>
<fragment android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:fitsSystemWindows="true"
android:layout_gravity="start"
android:name="com.funkhaus.brewwerks.NavigationDrawerFragment" />
. 마찬가지로 탐색 드로어 조각의 도구 모음 높이가으로 설정되어 그 아래로 슬라이드합니다.
DrawerLayout 외부에 도구 모음을 배치하십시오. – alanv
내 이해에 따라 네비게이션 드로어를 사용할 때''이 루트 뷰 여야합니다 –
Flash
콘텐츠 루트, 예. 툴바 루트가 아닙니다. – alanv