I'm animating the view so that the bottom navigation bar is hidden when the keyboard appears.
My problem is that I can translate the bottom navigation bar, and the main “message area” can follow it, but a space forms at the top of the “message area”. Is there a way to translate, but save the top of the “message area” according to the action bar?
Here is an example of the animation and break that forms:

My animation code is as follows:
if (lowerNavigationBar.getVisibility() == View.VISIBLE) {
lowerNavigationBar.animate()
.translationY(lowerNavigationBar.getHeight()).setDuration(1000).start();
viewPager.animate()
.translationY(lowerNavigationBar.getHeight()).setDuration(1000).start();
lowerNavigationBar.setVisibility(View.INVISIBLE);
}
else{
lowerNavigationBar.setVisibility(View.VISIBLE);
lowerNavigationBar.animate()
.translationY(0).setDuration(1000).start();
viewPager.animate()
.translationY(0).setDuration(1000).start();
}
Calco source
share