if (motionY > 50) {
// Animate the bottom app bar onto the screen.
objectAnimator = ObjectAnimator.ofFloat(appBarLayout, "translationY", 0);
if (motionY > 50) {
// Animate the bottom app bar onto the screen.
objectAnimator = ObjectAnimator.ofFloat(appBarLayout, "translationY", 0);