I'm working on an app that is already in production, it has multiple activities. The designers now want to add a Floating Action Button which is anchored to the bottom-right of two of our activities (possibly more in future). The FAB needs to remain at the same spot when the two activities transition between each other.
I know I can use shared element transition to achieve this, but the problem is we are using overridePendingTransition() to add a sliding animation when transitioning between the two activities, and that sliding animation gets broken when I use shared element transition as it gets overridden by the scene transition animation.
Has anyone had to do something similar?
To summarise, here are my requirements:
- two activitie transition between each other using a sliding animation
- a floating action button is in both activities, in the same location
- the FAB needs to remain stationary at all times, including during the transition between the two activities
- the FAB can but doesn't need to respond to onClick events during transition (this is an acceptable limitation)
- I don't care how dirty the implementation is, but I would strongly prefer not to refactor into a single activity because both activities are quite complex as they are
Happy to provide any additional details if it helps. Thanks.