Skip to content

Instantly share code, notes, and snippets.

@BenDLH
Last active October 18, 2016 07:30
Show Gist options
  • Select an option

  • Save BenDLH/bc1d158696edc260d3f16ba26e8a93e1 to your computer and use it in GitHub Desktop.

Select an option

Save BenDLH/bc1d158696edc260d3f16ba26e8a93e1 to your computer and use it in GitHub Desktop.
Sample implementation of the ParallaxScrollBehaviour
<?xml version="1.0" encoding="utf-8"?>
<layout 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.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/header_height"
android:background="@color/colorPrimary"
app:layout_behavior="@string/parallax_view_behavior">
<!-- @string/parallax_view_behavior = "com.example.app.behaviour.ParallaxScrollBehaviour" -->
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false" />
</android.support.design.widget.CoordinatorLayout>
</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment