| 1 |
<#if !hasAppBar> |
| 2 |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 |
xmlns:tools="http://schemas.android.com/tools" |
| 4 |
android:id="@+id/${detail_name}_container" |
| 5 |
android:layout_width="match_parent" |
| 6 |
android:layout_height="match_parent" |
| 7 |
tools:context="${relativePackage}.${DetailName}Activity" |
| 8 |
tools:ignore="MergeRootFrame" /> |
| 9 |
<#else> |
| 10 |
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 11 |
xmlns:app="http://schemas.android.com/apk/res-auto" |
| 12 |
xmlns:tools="http://schemas.android.com/tools" |
| 13 |
android:layout_width="match_parent" |
| 14 |
android:layout_height="match_parent" |
| 15 |
android:fitsSystemWindows="true" |
| 16 |
tools:context="${relativePackage}.${DetailName}Activity" |
| 17 |
tools:ignore="MergeRootFrame"> |
| 18 |
|
| 19 |
<android.support.design.widget.AppBarLayout |
| 20 |
android:id="@+id/app_bar" |
| 21 |
android:layout_width="match_parent" |
| 22 |
android:layout_height="@dimen/app_bar_height" |
| 23 |
android:fitsSystemWindows="true" |
| 24 |
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> |
| 25 |
|
| 26 |
<android.support.design.widget.CollapsingToolbarLayout |
| 27 |
android:id="@+id/toolbar_layout" |
| 28 |
android:layout_width="match_parent" |
| 29 |
android:layout_height="match_parent" |
| 30 |
android:fitsSystemWindows="true" |
| 31 |
app:contentScrim="?attr/colorPrimary" |
| 32 |
app:layout_scrollFlags="scroll|exitUntilCollapsed" |
| 33 |
app:toolbarId="@+id/toolbar"> |
| 34 |
|
| 35 |
<android.support.v7.widget.Toolbar |
| 36 |
android:id="@+id/detail_toolbar" |
| 37 |
android:layout_width="match_parent" |
| 38 |
android:layout_height="?attr/actionBarSize" |
| 39 |
app:layout_collapseMode="pin" |
| 40 |
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> |
| 41 |
|
| 42 |
</android.support.design.widget.CollapsingToolbarLayout> |
| 43 |
|
| 44 |
</android.support.design.widget.AppBarLayout> |
| 45 |
|
| 46 |
<android.support.v4.widget.NestedScrollView |
| 47 |
android:id="@+id/${detail_name}_container" |
| 48 |
android:layout_width="match_parent" |
| 49 |
android:layout_height="match_parent" |
| 50 |
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> |
| 51 |
|
| 52 |
<android.support.design.widget.FloatingActionButton |
| 53 |
android:id="@+id/fab" |
| 54 |
android:layout_width="wrap_content" |
| 55 |
android:layout_height="wrap_content" |
| 56 |
android:layout_gravity="center_vertical|start" |
| 57 |
android:layout_margin="@dimen/fab_margin" |
| 58 |
app:srcCompat="@android:drawable/stat_notify_chat" |
| 59 |
app:layout_anchor="@+id/${detail_name}_container" |
| 60 |
app:layout_anchorGravity="top|end" /> |
| 61 |
|
| 62 |
</android.support.design.widget.CoordinatorLayout> |
| 63 |
</#if> |