Created
May 11, 2016 20:24
-
-
Save amilcar-andrade/4bfcc68610c5f965d9f666438c508381 to your computer and use it in GitHub Desktop.
CollapsingToolbarLayout
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.design.widget.CoordinatorLayout android:id="@+id/main_content" | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<android.support.design.widget.AppBarLayout | |
android:layout_width="match_parent" | |
android:layout_height="128dp" | |
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> | |
<android.support.design.widget.CollapsingToolbarLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layout_scrollFlags="scroll|exitUntilCollapsed"> | |
<android.support.v7.widget.Toolbar | |
android:id="@+id/toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="?attr/actionBarSize" | |
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" | |
app:layout_collapseMode="pin" | |
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> | |
</android.support.design.widget.CollapsingToolbarLayout> | |
</android.support.design.widget.AppBarLayout> | |
<!-- Use android:foreground to create the shadow effect --> | |
<FrameLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:foreground="@drawable/shadow_foreground" | |
app:layout_behavior="@string/appbar_scrolling_view_behavior"> | |
<android.support.v4.view.ViewPager | |
android:id="@+id/pager" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" /> | |
</FrameLayout> | |
</android.support.design.widget.CoordinatorLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment