I have a map fragment, which is basically a map with a few additional buttons on top of it.
Now, I need to use that map fragment in a FrameLayout. In that same FrameLayout, I also add some other views. My question is: Is it possible to make the mentioned buttons (in my map fragment) be drawn on top of these other views (in the FrameLayout)? I’ve tried using bringToFront, SetTranlationZ and elevation, without success. I assume this is because I am trying to get a button to be on top of something from another part of the hierarchy, which I assume may not be so easy. Is it at all possible?
To clarify, here is a schematic overview of my components:
L (FrameLayout)
-- F (fragment)
---- M (GoogleMap)
---- B (Button)
-- V (some other view)
So F and V belong to L, and M and B belong to F. And my question is: Is it possible to make B be on top of V, while at the same time having V on top of M? That is, can V be put between M and B (in the z order)?