Last active
October 18, 2016 07:30
-
-
Save BenDLH/bc1d158696edc260d3f16ba26e8a93e1 to your computer and use it in GitHub Desktop.
Sample implementation of the ParallaxScrollBehaviour
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
| <?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