Skip to content

Instantly share code, notes, and snippets.

@Elijah-Dangerfield
Last active February 1, 2020 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elijah-Dangerfield/b9e41e62725aa0c6b2fba899b2d7dd66 to your computer and use it in GitHub Desktop.
Save Elijah-Dangerfield/b9e41e62725aa0c6b2fba899b2d7dd66 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="appbar_title_height">125dp</dimen>
<dimen name="appbar_header_height">200dp</dimen>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.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:animateLayoutChanges="true"
android:background="@android:color/white"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="@dimen/appbar_title_height"
android:background="#00FFFFFF"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Light">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:collapsedTitleGravity="center_vertical"
app:contentScrim="@android:color/background_light"
app:expandedTitleMargin="32dp"
app:expandedTitleMarginStart="16dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
app:title="@string/latest_title">
<androidx.appcompat.widget.Toolbar
android:id="@+id/anim_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:titleMargin="0dp"
app:titleTextAppearance="@style/boldStyleText" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<!--{PLACE FRAGMENT OR ACTIVITY LAYOUT HERE}-->
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment