Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ataulm/d65059e914d1b1de8e8e6243c8fcb737 to your computer and use it in GitHub Desktop.
Save ataulm/d65059e914d1b1de8e8e6243c8fcb737 to your computer and use it in GitHub Desktop.
public interface AppBarExpander {
void expandAppBar();
void collapseAppBar();
}
public class SeasonsActivity extends AppCompatActivity implements AppBarExpander {
...
@Override
public void expandAppBar() {
boolean animate = true;
appBarLayout.setExpanded(true, animate);
}
@Override
public void collapseAppBar() {
boolean animate = true;
appBarLayout.setExpanded(false, animate);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment