Created
January 31, 2017 15:59
-
-
Save dengue8830/86396e744532e433c2add2d8f927456e to your computer and use it in GitHub Desktop.
Detail layout with collapsing toolbar from android studio examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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="com.amla.pruebaconradiotulsdk.ItemDetailActivity" | |
tools:ignore="MergeRootFrame"> | |
<android.support.design.widget.AppBarLayout | |
android:id="@+id/app_bar" | |
android:layout_width="match_parent" | |
android:layout_height="@dimen/app_bar_height" | |
android:fitsSystemWindows="true" | |
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> | |
<android.support.design.widget.CollapsingToolbarLayout | |
android:id="@+id/toolbar_layout" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true" | |
app:contentScrim="?attr/colorPrimary" | |
app:layout_scrollFlags="scroll|exitUntilCollapsed" | |
app:toolbarId="@+id/toolbar"> | |
<android.support.v7.widget.Toolbar | |
android:id="@+id/detail_toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="?attr/actionBarSize" | |
app:layout_collapseMode="pin" | |
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> | |
</android.support.design.widget.CollapsingToolbarLayout> | |
</android.support.design.widget.AppBarLayout> | |
<android.support.v4.widget.NestedScrollView | |
android:id="@+id/item_detail_container" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> | |
<android.support.design.widget.FloatingActionButton | |
android:id="@+id/fab" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="center_vertical|start" | |
android:layout_margin="@dimen/fab_margin" | |
app:layout_anchor="@+id/item_detail_container" | |
app:layout_anchorGravity="top|end" | |
app:srcCompat="@android:drawable/stat_notify_chat" /> | |
</android.support.design.widget.CoordinatorLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment