Hello, I see that an `AndroidExternalSurface` insi...
# compose-android
g
Hello, I see that an
AndroidExternalSurface
inside a screen in a
NavHost
is not affected by `NavHost`'s
enterTransition
and
exitTransition
(due to the Surface having its own window I guess), how do I make it animated like the rest of the screen anyway?
r
It comes with a ton of limitations. Try with an AndroidEmbeddedExternalSurface
(it's SurfaceView vs TextureView)
g
Thanks @romainguy, much better behavior!
r
Note that AndroidExternalSurface is better for battery though
So if you are displaying long content, consider using that
👍 1
j
@romainguy If you need to use AndroidExternalSurface because of battery life concerns is there any work around to use in order to get the surface to animate correctly?
r
A transition with only translate/scale/fade could work but I don’t know enough about the internals of the transition system to fully answer this
The problem is that a surface view is a second window. Work was done in recent (>24) api levels to properly sync both windows but that assumes you don’t need to relayée, crossfade, etc.