Last active
November 25, 2018 19:29
-
-
Save patrick-elmquist/4f61943d396eb0ac5e7bde3ad564cf65 to your computer and use it in GitHub Desktop.
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
recyclerView.apply { | |
// Create and attach the adapter | |
adapter = ShowAdapter(tvShows) | |
// Configure to be a horizontal list | |
layoutManager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false) | |
// Attach a snap helper, more on that below | |
PagerSnapHelper().attachToRecyclerView(this) | |
// Where most of the parallax magic happens | |
setupParallaxScrollListener() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment