2016-11-29 1 views
-1

탐색 서랍 템플릿이있는 앱을 만들었습니다. 이 템플릿을 수정했지만 서랍은 항상 작업 표시 줄 위에 있습니다. 이 문제를 해결하도록 도와주세요. 서랍 레이아웃을 작업 표시 줄 아래에 놓고 싶습니다. The screen loks something like this작업 모음 위의 서랍 레이아웃

감사합니다.

+0

이것은 우리가 화면의 페이딩이 동안 사용할 때 http://www.gadgetsaint.com/android/android-navigation-drawer-toolbar/#.WOBABBJ97fY하지만 작업 표시 줄도 – ASP

답변

0

이 방법을 사용하여 막대를 덮지 않도록 서랍을 만듭니다. 잘 작동합니다. 서랍은 덮개없이 열립니다.

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout 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.support.v7.widget.Toolbar 
     android:id="@+id/mainToolbar" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:theme="@style/ToolbarCustomStyle"> 

    </android.support.v7.widget.Toolbar> 

    <android.support.v4.widget.DrawerLayout 
     android:id="@+id/drawer_main_layout" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_below="@+id/mainToolbar"> 

     <!-- Content of Drawer--> 

     <android.support.design.widget.CoordinatorLayout 
      android:id="@+id/main_content" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:background="@color/colorWhite"> 

      <!-- INCLUDE LAYOUT CONTENT HERE using <include /> , or put directly your widgets--> 
      <include layout="@layout/content_main_activity" /> 

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

     <!-- NavDrawer actions --> 
     <android.support.design.widget.NavigationView 
      android:id="@+id/navigationView" 
      android:layout_width="@dimen/header_drawer_height_nav_width" 
      android:layout_height="match_parent" 
      android:layout_gravity="start" 
      android:background="@color/colorWhite" 
      android:orientation="vertical" 
      > 

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


    </android.support.v4.widget.DrawerLayout> 

</RelativeLayout> 
+0

을 받고 도움이 될 시든 –