What identifies the Drawer Fragment in the Drawer Layout?

by Mekacher Anis   Last Updated November 09, 2018 01:11 AM

Suppose we have this XML file :

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout 
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".DeviceControlActivity">

<!-- As the main content view, the view below consumes the entire
     space available using match_parent in both dimensions. -->
<FrameLayout
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

<!-- The drawer is given a fixed width in dp and extends the full height of
     the container. -->
<fragment
    android:id="@+id/navigation_drawer"
    android:name="com.anis.windowscontrollerclient.NavigationDrawerFragment"
    android:layout_width="@dimen/navigation_drawer_width"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    tools:layout="@layout/drawer_device_control" />
</android.support.v4.widget.DrawerLayout>

What is the thing that Identifies which view is the Drawer Fragment ? More Specifically when you click the Drawer Button in the Action Bar how cant it tell which 'View Id' it shall call openDrawer(layouId) with ?

Tags : app-drawer


Related Questions


Updated April 08, 2016 08:04 AM

Updated September 09, 2017 12:11 PM

Updated July 29, 2018 19:11 PM

Updated February 12, 2018 11:11 AM

Updated May 21, 2015 00:04 AM