z-index in Relative layout

后端 未结 5 800
情深已故
情深已故 2020-12-16 12:47

I need to place a TextView above the Button in RelativeLayout. But it is not working: TextView is always under the Button, even if I move it before the button. I also tried

5条回答
  •  甜味超标
    2020-12-16 13:09

    Take RelativeLayout as your button by changing its background and set TextView as centerInParent="True"

    
    
        
    
    
    

    Class

    (RelativeLayout)findViewById(R.id.rlBottom).setOnClick(new OnClick... //like a button
    

提交回复
热议问题