Jose Jerson Naval Jr
Lurker
I know the xmlns:app="http://schemas.android.com/apk/res-auto" is a URI to prevent namespace collision because of the 'you-can-write-any-tags-you-want-that-you-can-parse' nature of xml. But I am constantly become dumber as I dig deeper into this.
For example, I am confuse as to whether the namespace contains numerous extended attributes that the normal namespace 'http://schemas.android.com/apk/res/android' doesn't have. I am struggling to look for documentation/enumeration of attributes under this namespace.
Here is some material design layout, notice it uses the app namespace (which by the way I could name anything right?)
Now I don't understand the attrs app:layout_behavior, app
opupTheme, I can't seem to find any documentation regarding this. Some of it are straight forward, but some aren't. Its hard that I have to copy/refer to some online articles to know what 'VALUES' goes in each of them. I suddenly have questions like what does it do, which is not normal given that I am working on an SDK that I believe is highly/overtly documented. I can't find documentation/language spec which enumerates res-auto attrs. I understood xml namespace this way. If I am wrong, I can appreciate any correction.
Can you help me understand this namespace? Is it just a convention of some sort? Where can I find the list attribute that goes under that? I am struggling adapting my UI design in Material because I haven't encountered some of the attrs there.
Thanks a lot!
For example, I am confuse as to whether the namespace contains numerous extended attributes that the normal namespace 'http://schemas.android.com/apk/res/android' doesn't have. I am struggling to look for documentation/enumeration of attributes under this namespace.
Here is some material design layout, notice it uses the app namespace (which by the way I could name anything right?)
Code:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
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:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".HomeScreenActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/main.appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:fitsSystemWindows="true" >
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar_homescreen"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark" />
<android.support.design.widget.TabLayout
android:id="@+id/tablayout_homescreen"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="fixed"
app:tabGravity="fill"/>
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewpager_homescreen"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="" />
</android.support.design.widget.CoordinatorLayout>
Now I don't understand the attrs app:layout_behavior, app

Can you help me understand this namespace? Is it just a convention of some sort? Where can I find the list attribute that goes under that? I am struggling adapting my UI design in Material because I haven't encountered some of the attrs there.
Thanks a lot!