Skip to content

Instantly share code, notes, and snippets.

@nontravis
Created June 1, 2018 15:23
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 nontravis/ca405ba60d1a585d69c0263bd960ed6f to your computer and use it in GitHub Desktop.
Save nontravis/ca405ba60d1a585d69c0263bd960ed6f to your computer and use it in GitHub Desktop.
CoordinatorLayout.xml
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00FF00" //green
android:fitsSystemWindows="true">
<View
android:layout_width="48dp"
android:layout_height="48dp"
android:background="#000000" //black />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<!-- Your Content -->
</android.support.design.widget.CoordinatorLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment