Adding text to ImageView in Android

后端 未结 9 1615
北荒
北荒 2020-12-02 16:44

I want to use an ImageView to show some message in a fancy way.

How do I add text to an ImageView?

9条回答
  •  北海茫月
    2020-12-02 17:25

    With a FrameLayout you can place a text on top of an image view, the frame layout holding both an imageView and a textView.

    If that's not enough and you want something more fancy like 'drawing' text, you need to draw text on a canvas - a sample is here: How to draw RTL text (Arabic) onto a Bitmap and have it ordered properly?

提交回复
热议问题