Skip to content

Instantly share code, notes, and snippets.

@pareshchouhan
Created December 6, 2015 17:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pareshchouhan/e71253f6c41179754347 to your computer and use it in GitHub Desktop.
Save pareshchouhan/e71253f6c41179754347 to your computer and use it in GitHub Desktop.
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