Created
January 21, 2019 00:54
-
-
Save dynoChris/2e7198d2f9188666c5a6f29e6d8eec1a to your computer and use it in GitHub Desktop.
Set scroll flags to Collapsing Toolbar
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
AppBarLayout.LayoutParams params = (AppBarLayout.LayoutParams) collapsToolbar.getLayoutParams(); | |
params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_EXIT_UNTIL_COLLAPSED); | |
collapsToolbar.setLayoutParams(params); | |
//clear scroll flags — params.setScrollFlags(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment