XML : Navigation Drawer, Toolbar, and Recycler View all in same xml layout file?

I'm not good with android layout files and right now I have a file that has a Toolbar widget, and a recycler view widget. Here's the code.

  <?xml version="1.0" encoding="utf-8"?>    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:app="http://schemas.android.com/apk/res-auto"    android:orientation="vertical"    android:layout_width="match_parent"    android:layout_height="match_parent">         <android.support.v7.widget.Toolbar         android:id="@+id/robot_chooser_toolbar"         android:layout_width="match_parent"         android:layout_height="?attr/actionBarSize"         android:background="?attr/colorPrimary"         android:elevation="4dp"         android:theme="@style/ThemeOverlay.AppCompat.ActionBar"         app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>         <android.support.v7.widget.RecyclerView         android:id="@+id/robot_recycler_view"         android:paddingTop="5dp"         android:scrollbars="vertical"         android:layout_width="match_parent"         android:layout_height="match_parent"/>      <TextView        android:id="@+id/robot_empty_view"        android:layout_width="fill_parent"        android:layout_height="fill_parent"        android:textSize="20sp"        android:text="@string/no_robots"        android:elevation="3dp"        android:layout_gravity="center"        android:visibility="gone"        android:gravity="center" />    </LinearLayout>    

How could I add a DrawerLayout to this?

No comments:

Post a Comment