Android导航抽屉UI的不同显示在SDK 22下方

时间:2016-10-10 11:43:24

标签: android navigation-drawer android-5.0-lollipop android-6.0-marshmallow android-4.4-kitkat

enter image description here 导航抽屉在上面的 SDK 23 中工作,并且相同的应用在SDK 22下面执行,其标题不会出现在导航抽屉中......它正在显示作为空白屏幕动作栏标题。

以下是我的NavigationDrwer .xml

<?xml version="1.0" encoding="utf-8"?>
<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/coordinateLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.smsapp.DashBoardActivity">

<android.support.design.widget.AppBarLayout
    android:id="@+id/app_bar"
    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.design.widget.AppBarLayout>

<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"


    tools:openDrawer="start">

    <!--
        <include
            layout="@layout/app_bar_dash_board"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    -->


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="fill_parent"
        android:background="@drawable/white_image_bg"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/container_toolbar"
            android:layout_width="match_parent"
            android:layout_height="50dp"

            android:orientation="vertical">

            <include
                layout="@layout/app_bar_dash_board"
                android:layout_width="match_parent"
                android:layout_height="50dp" />
        </LinearLayout>

        <FrameLayout
            android:id="@+id/container_body"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1"
            android:background="@drawable/white_image_bg">


        </FrameLayout>
    </LinearLayout>


    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view"
        android:name="com.smsapp.DashBoardActivity"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        android:scrollbars="none"
        app:itemIconTint="@color/colorPrimaryDark"
        app:menu="@menu/activity_dash_board_drawer" />


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

0 个答案:

没有答案