0

I am using a DrawerLayout with a NavigationView inside.

I would like to place a TextView in the bottom of NavigationDrawer, under the menu items. Is it possible?

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

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

    <android.support.design.widget.NavigationView
        android:id="@+id/nav_drawer_core"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        app:headerLayout="@layout/core_nav_drawer_header"
        app:menu="@menu/core_nav_drawer_body"
        android:background="@color/core_nav_drawer_background">

        <TextView
            android:id="@+id/core_nav_drawer_logo_sbs"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="0.4"
            android:gravity="center_vertical"
            android:paddingStart="16dp"
            android:textColor="@color/white"
            android:text="a"/>

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

</android.support.v4.widget.DrawerLayout>
eldivino87
  • 1,425
  • 1
  • 17
  • 30

2 Answers2

1

Yes it is, check out this post that explains how to accomplish it. Try to search stackoverflow before asking a question, you'll be amazed how often the same questions is asked.

Community
  • 1
  • 1
Chris
  • 3,329
  • 1
  • 30
  • 44
0

Never waste your time again. It provides you with the easiest possible implementation of a navigation drawer for your application. There is a Header with profiles ( AccountHeader), a MiniDrawer for Tablets (like Gmail), provide custom DrawerItems, custom colors, custom themes, ... No limits for customizations.

You can use https://android-arsenal.com/details/1/1526

Rajesh Gauswami
  • 572
  • 7
  • 22