1

Need to put an information layout above the others.. but the half up of layout 3, is below the layout 1..

what i need.. layout 3 above the others, and in the center of the padding

what i have.. layout 1 above 3, and layout 3 above layout 2

using RelativeLayout i get layout 3 below the others, the opposite.

is there an option or something like bring to front??

Any other clue?

Thanks!

Carlos.V
  • 409
  • 6
  • 13

1 Answers1

1

Each View's position on the Z-axis is dependent on its order in the XML file. Try placing the layout you want on top after the other two layouts in your XML file. If you want to change the View's position in your java code, you can use

view.bringToFront();

http://developer.android.com/reference/android/view/View.html#bringToFront%28%29

  • Thanks, i didn't know it exists, i called using this, `View layoutToast = findViewById(R.id.layoutToast); layoutToast.bringToFront();` and it sends layout 3 to the bottom of the screen , do i have to send the others layout to below after bringing this to front? – Carlos.V Oct 23 '15 at 16:27
  • i could do it thanks to this that give me an idea.. http://stackoverflow.com/questions/2614393/defining-z-order-of-views-of-relativelayout-in-android/14847549#comment30116833_2614402 – Carlos.V Oct 23 '15 at 17:39