Created
July 16, 2017 09:32
-
-
Save Rishabhk07/90674397cf5c655838a65542a21385bb to your computer and use it in GitHub Desktop.
Collapsing toolbar android
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
<?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" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true"> | |
<android.support.design.widget.AppBarLayout | |
android:id="@+id/app_bar" | |
android:layout_height="250dp" | |
android:layout_width="match_parent" | |
android:fitsSystemWindows="true" | |
android:background="@color/transparent" | |
> | |
<android.support.design.widget.CollapsingToolbarLayout | |
android:id="@+id/ctFullStory" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:contentScrim="@android:color/white" | |
android:fitsSystemWindows="true" | |
app:layout_scrollFlags="scroll|exitUntilCollapsed" | |
> | |
<ImageView | |
android:src="@mipmap/ic_launcher" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:id="@+id/ivFullStory" | |
android:fitsSystemWindows="true" | |
app:layout_collapseMode="parallax" | |
android:scaleType="centerCrop" | |
/> | |
<android.support.v7.widget.Toolbar | |
android:id="@+id/toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="?attr/actionBarSize" | |
android:fitsSystemWindows="true" | |
app:layout_collapseMode="pin" | |
/> | |
</android.support.design.widget.CollapsingToolbarLayout> | |
</android.support.design.widget.AppBarLayout> | |
<include | |
layout="@layout/full_story_webview"></include> | |
</android.support.design.widget.CoordinatorLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment