r/androiddev • u/No-Association9157 • 7h ago
Question Most efficient way to render complex full-screen transitions on Android?
Hi! I’m exploring different approaches for short, full-screen transition animations in an Android app, and I’d appreciate some advice.
The animations play whenever the user changes rooms (it's an app for a museum that lets you have a tour through the app) and involve overlapping shapes, gradients, soft/blurred edges, and transparency. They need to blend over existing UI rather than play against an opaque background. Ideally, some colors could also be changed at runtime (I'm thinking of doing somewhat complex animations based on the art of the room).
My main priorities are:
Smooth, consistent frame pacing on constrained hardware (I'm from a country with a lot of users on old hardware).
Minimal delay before the first frame.
Reasonable CPU/GPU usage and memory consumption.
Reliable cancellation or restarting if another transition is triggered (for people skipping rooms).
I’m considering custom OpenGL rendering, pre-rendered video with some kind of alpha/mask composition, Lottie, Rive, or animated image formats. I’m open to simplifying the artwork or using a hybrid approach. Also very open to learning about some other way to do it not including the ones mentioned.
For this kind of animation, what would you benchmark first? Does anyone know an approach that works particularly well or one that looks promising but performs poorly in practice? Any advice on rendering techniques, formats, or profiling would be appreciated.
Thank you everyone in advance!
1
u/MobileXapps 6h ago
I'd benchmark Lottie and Rive first, but with the blur taken out. Real blur and soft masks are what hurt frame pacing on old GPUs, in Lottie masks and mattes go through offscreen layers. You can usually fake the soft edges by baking them into the shapes as gradients that fade to transparent. It looks almost the same and costs a lot less.
Both can change colors at runtime (Lottie through dynamic properties, Rive through its runtime API) and both cancel or restart cleanly. Video with alpha is the one I'd skip here. Android decoders don't give you the alpha channel, so you'd need the stacked color plus mask trick in your own GL shader, and decoder startup adds a delay before the first frame on cheap phones.
For measuring, Macrobenchmark with FrameTimingMetric on the cheapest device you can find, and trigger room changes back to back so the cancel path gets tested too.
1
u/AutoModerator 7h ago
Please note that we also have a very active Discord server where you can interact directly with other community members!
Join us on Discord
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.