Created
December 6, 2015 17:18
-
-
Save pareshchouhan/e71253f6c41179754347 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
yes you can | |
AppBarLayout appBar; | |
appBar.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() { | |
@Override | |
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) { | |
if(verticalOffset > -300) { | |
collapsedAppBar.setTitleEnabled(false); | |
} | |
else { | |
collapsedAppBar.setTitleEnabled(true); | |
collapsedAppBar.setTitle(movie.original_title); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment