android - linear layout bringToFront()

前端 未结 4 626
走了就别回头了
走了就别回头了 2021-01-12 04:23

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
         


        
4条回答
  •  感动是毒
    2021-01-12 05:06

    If you have to work with z-axis in a LinearLayout, you may use setTranslationZ function.

    Example:

    yourView.setTranslationZ(100);
    

提交回复
热议问题