Android Text over image

前端 未结 9 1096
既然无缘
既然无缘 2020-12-02 06:44

I have an imageView with an image, over that image I want to place a text. How can I achieve that?

9条回答
  •  旧巷少年郎
    2020-12-02 07:13

    There are many ways. You use RelativeLayout or AbsoluteLayout.

    With relative, you can have the image align with parent on the left side for example and also have the text align to the parent left too... then you can use margins and padding and gravity on the text view to get it lined where you want over the image.

提交回复
热议问题