Created
November 28, 2017 15:54
-
-
Save Ronelg/048aa0c836ed02a55c860a9914b53af9 to your computer and use it in GitHub Desktop.
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
<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.support.v4.view.ViewPager | |
android:id="@+id/viewpager" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> | |
<android.support.design.widget.AppBarLayout | |
android:id="@+id/appbar" | |
android:layout_width="match_parent" | |
android:layout_height="SPECIFIC HEIGHT HERE!" | |
android:fitsSystemWindows="true" | |
android:theme="ADD A STYLE HERE IF YOU WANT"> | |
<android.support.design.widget.CollapsingToolbarLayout | |
android:id="@+id/collapsing_toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true" | |
app:contentScrim="?attr/colorPrimary" | |
app:layout_scrollFlags="scroll|exitUntilCollapsed" | |
> | |
<ImageView | |
android:id="@+id/backdrop" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true" | |
android:scaleType="centerCrop" | |
android:src="YOUR SOURCE" | |
app:layout_collapseMode="parallax" | |
app:layout_collapseParallaxMultiplier="YOUR MULTIPLIER" | |
/> | |
<android.support.v7.widget.Toolbar | |
android:id="@+id/toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="?attr/actionBarSize" | |
app:popupTheme="YOUR POPUP THEME"> | |
</android.support.v7.widget.Toolbar> | |
<android.support.design.widget.TabLayout | |
android:id="@+id/tabs" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_gravity="bottom" | |
app:tabGravity="YOUR TAB GRAVITY" | |
app:tabIndicatorColor="YOUR TAB INDICATOR COLOR" | |
app:tabMode="YOUR TAB MODE"> | |
</android.support.design.widget.TabLayout> | |
</android.support.design.widget.CollapsingToolbarLayout> | |
</android.support.design.widget.AppBarLayout> | |
</android.support.design.widget.CoordinatorLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment