I have 4 buttons in my linear layout and i need to bring to front first button.
Normal order is
Button 1 | Button 2 | Button 3 | Button 4
Since bringToFront
messes up the LinearLayout
order, I decided to use a RelativeLayout
and put the "top" view (the view I want on top) last in the XML.
Example:
In the specific case of this question, the ViewOnTop
would be the Button 1, and the ViewBelow
would be a LinearLayout
containing the other buttons.