sdk - Android Studio Navigation Drawer app:headerlayout and app:menu XML attributes? -


i'm new android development please excuse me if ask silly questions when i've created navigation drawer project, activity_main.xml file 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 navigationview class in hope understand little more left me confused because couldn't find xml attribute app:headerlayout , app:menu in documentation?

  1. what the differences between android , app namespace?
  2. why xml attributes app prefix not documented?
  3. are there anymore hidden xml attributes should aware of may not documented? if can provide references?

navigationview part of support library, , layouts going set, headerlayout or menu defined in package, hence have use namespace package name or use res-auto automatically package layouts.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo