mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
442 stars 128 forks source link

Older Android devices fully recreate map surface if using texture view #607

Open kiryldz opened 2 years ago

kiryldz commented 2 years ago

Environment

Observed behavior and steps to reproduce

Minimize and maximize device that fulfils requirements above. You will see map reloading from scratch because of full resource recreation and new surface.

Newer devices are not affected as TextureView.SurfaceTextureListener.onSurfaceTextureDestroyed / TextureView.SurfaceTextureListener.onSurfaceTextureAvailable are not even get called when stopping / starting host activity / fragment.

Expected behavior

Should behave the same as for surface view.

Notes / preliminary analysis

Additional links and references

Fix was introduced here

pengdev commented 2 years ago

@kiryldz is this done? shall we close it?

kiryldz commented 2 years ago

That's not done.