Android Navigation drawer UI different displayed i

2019-09-07 01:57发布

问题:

Navigation drawer working pretty in above SDK 23 and same app execute on below SDK 22 its Title not appear in navigation drawer...It's showing as blank screen Actionbar title.

Below is my 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>