0

сделана навигация выдвижной ящик внизу action балка. Он работает отлично на Jellybean зева, но в алтея зева он не работает ..Выдвижной ящик для навигации выдвижения ящика

in maeshamllow

в Jellybean enter image description here моей деятельности основной XML является

<?xml version="1.0" encoding="utf-8"?> 
<android.support.v4.widget.DrawerLayout 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/drawer_layout" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:fitsSystemWindows="true" 
    tools:openDrawer="start"> 

    <include 
     layout="@layout/app_bar_checkout" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" /> 

    <FrameLayout 
     android:id="@+id/content_frame" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" /> 
    <!-- The navigation drawer --> 
    <ExpandableListView 
     android:id="@+id/left_drawer" 
     android:layout_width="240dp" 
     android:layout_height="match_parent" 
     android:layout_gravity="start" 
     android:background="#fdfdfd" 
     android:choiceMode="singleChoice" 
     android:divider="@android:color/transparent" 
     android:dividerHeight="0dp" 
     android:groupIndicator="@null" 
     android:layout_marginTop="?attr/actionBarSize" 
     /> 

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

ответ

0

Я получил его таким образом

<LinearLayout 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:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="vertical" 
android:fitsSystemWindows="true" 
tools:context="com.qproinnovations.schoolmanagement.activity.HomeActivity"> 
    <android.support.design.widget.AppBarLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:theme="@style/AppTheme.AppBarOverlay"> 

     <android.support.v7.widget.Toolbar 
      android:id="@+id/toolbar" 
      android:layout_width="match_parent" 
      android:layout_height="?attr/actionBarSize" 
      android:background="?attr/colorPrimary" 
      app:popupTheme="@style/AppTheme.PopupOverlay" > 

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

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

    <android.support.v4.widget.DrawerLayout 
     android:id="@+id/drawer_layout" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:fitsSystemWindows="true" 
     tools:openDrawer="start"> 

     <include layout="@layout/content_home" /> 

     <android.support.design.widget.NavigationView 
      android:id="@+id/nav_view" 
      android:layout_width="wrap_content" 
      android:layout_height="match_parent" 
      android:layout_gravity="start" 
      android:fitsSystemWindows="true" 
      app:menu="@menu/activity_home_drawer" /> 


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



</LinearLayout> 
0

Компоновка ящик допускается только 2 детей, первый - основной вид содержимого, второй - ящик. Вам нужно объединить два первых вида в линейную компоновку.

<LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:orientation="vertical"> 

    <include 
    layout="@layout/app_bar_checkout" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" /> 

    <FrameLayout 
    android:id="@+id/content_frame" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" /> 

</LinearLayout> 
+0

ее не работает в зефир во всяком случае спасибо за ответ .. –

+0

ли вы реализовать предлагаемое изменение? –

+0

yea.when я внедрил это.Нет изменений в output.In зефир ящик naviagtion не находится под панелью действия..thanks –