I want to show or hide my action bar more smoothly .. Currently, I do this when my scrolller view scrolls state in my activity changes.
if (scrollState == ScrollState.UP) {
if (mActionBar.isShowing()) {
mActionBar.hide();
}
} else if (scrollState == ScrollState.DOWN) {
if (!mActionBar.isShowing()) {
mActionBar.show();
}
}
I need smoother animations like in the Google Play app.
styles.xml
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="windowActionBar">false</item>
</style>
Initialize the action bar
setSupportActionBar(mToolbar);
mActionBar = getSupportActionBar();
source
share