MapView V2 in a ScrollView draws itself over the ActionBar
Asked Answered
S

0

1

So, all bad things in the title aside, I've got a MapView (and a few other Views) inside of a ScrollView (I know, and I've advised a thousand times against putting a MapView in a scrolling container but this is what the client wants) and when I scroll the ScrollView up the MapView ends up drawing over the ActionBar. I set the zOrderOnTop to true on the GoogleMapOptions that I pass to the constructor of MapView which prevents this from happening when I first add the MapView to the view hierarchy, but when I navigate away and come back to the app the map is drawn over the ActionBar again.

I have to artificially call the MapView lifecycle events when the MapView is created and placed into the ScrollView because I make a network call, and depending on the data I may or may not need to add a map.

I've been searching on Google and SO for ways to mitigate this and I've come up with nothing. The phones I'm testing on are Android 4.1+ so it should be using the TextureView implementation and not the SurfaceView implementation of MapView.

Struma answered 20/9, 2013 at 23:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.