0% found this document useful (0 votes)
2 views

xml version=1.0 encoding=utf-8

The document is an XML layout file for an Android application using a DrawerLayout. It includes a main content area with an app bar, a container for main content, and a bottom navigation view, along with a navigation drawer. The layout is designed to fit system windows and includes references to external layout and menu resources.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

xml version=1.0 encoding=utf-8

The document is an XML layout file for an Android application using a DrawerLayout. It includes a main content area with an app bar, a container for main content, and a bottom navigation view, along with a navigation drawer. The layout is designed to fit system windows and includes references to external layout and menu resources.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<?xml version="1.0" encoding="utf-8"?

>
<androidx.drawerlayout.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/drawerlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start"
tools:context=".MainActivity">

<!-- Main Content Layout -->


<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<!-- App Bar -->


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

<!-- Main Content Area -->


<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>

<!-- Bottom Navigation -->


<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:menu="@menu/nav_bar"/>
</LinearLayout>

<!-- Navigation Drawer -->


<com.google.android.material.navigation.NavigationView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/header"
app:menu="@menu/drawer_items"/>
</androidx.drawerlayout.widget.DrawerLayout>

You might also like