I'm completely new to Android development so please excuse me if I ask silly questions but when I've created a Navigation Drawer project, activity_main.xml file is created:
<?xml version="1.0" encoding="utf-8"?>
<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"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
</android.support.v4.widget.DrawerLayout>
I looked up the NavigationView class in hope to understand it a little more but it left me confused because I couldn't find the XML attribute app:headerLayout and app:menu in the documentation?
- What are the the differences between the android and app namespace?
- Why are the XML attributes with the app prefix not documented?
- Are there anymore hidden XML attributes I should be aware of that may not be documented? If so can you provide some references?