Android Navigation drawer UI different displayed in Below SDK 22

余生颓废 提交于 2019-12-12 04:30:22

问题


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>

来源:https://stackoverflow.com/questions/39957481/android-navigation-drawer-ui-different-displayed-in-below-sdk-22

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!