Adding text to ImageView in Android

后端 未结 9 1639
北荒
北荒 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:29

    You can use the TextView for the same purpose, But if you want to use the same with the ImageView then you have to create a class and extends the ImageView then use onDraw() method to paint the text on to the canvas. for more details visit to http://developer.android.com/reference/android/graphics/Canvas.html

提交回复
热议问题