I am trying to display a view under the Bottom Navigation Bar to show a message to the user.
- This view needs to be hidden with a Translation Animation.
The current behaviour without an animation looks as per the attachment below
When performing the animation, the section covered by the Translation Animation is then removed from the screen and leaves a blank space (which I cannot get rid of it):
Here is the code for the Animation:
public void hideGlobalAppMessage(){
//Animation that hides the green message down
globalMessageContainer.animate()
.translationY(globalMessageContainer.getHeight())
.setDuration(500);
//Animation that moves the bottom navigation bar down
navBar.animate()
.translationY(globalMessageContainer.getHeight())
.setDuration(500);
}
Is there any alternate way to perform this animation without getting this issue?
Thanks in advance