I have a RelativeLayout on which I have controls on top. At runtime, I want to show a MapView that is just added to the layout, hiding all the other views below it, but not the controls on top. Later, MapView hides again.
layout_main.bringChildToFront(layout_main.findViewWithTag("paramsUI"));
layout_main.invalidate();
FindViewByTag seems to work, I checked this in Debug mode. I also tried:
layout_main.findViewWithTag("paramsUI").bringToFront();
Do I need something else?
Edit: Sorry, the problem is that MapView is hiding the control panel, which should be at the top of all views due to the call to bringToFront ().
source
share