I'm working with Lollipop transitions between two activities. I have a shared element which I animate with a transition to and from activities A and B. In activity B a keyboard pops up and resizes the window. The animation looks great when going into activity B. The problem is when returning back to activity A the shared element transition looks bad because the windows size is still based on what the keyboard resized it to (even though the keyboard minimizes automatically when going back to A and eventually the window is the correct size).
I have tried manually hiding the soft input before leaving activity B and calling finishAfterTransition. Unfortunately no luck! I have also tried postponing the shared element transition, but that also didn't work well. One solution would be to have a tiny delay (10ms) when the user presses back to finish activity B in order to give the window time to resize itself before leaving, but that feels hacky to me.
Any ideas greatly appreciated!