Placing/Overlapping(z-index) a view above another view in android

前端 未结 11 1792
遥遥无期
遥遥无期 2020-11-22 17:07

I have a linear layout which consists of imageview and textview , one below another in a linear layout.



        
11条回答
  •  鱼传尺愫
    2020-11-22 17:39

    You can't use a LinearLayout for this, but you can use a FrameLayout. In a FrameLayout, the z-index is defined by the order in which the items are added, for example:

    
        
        
    
    

    In this instance, the TextView would be drawn on top of the ImageView, along the bottom center of the image.

提交回复
热议问题