How to write text on an image

前端 未结 4 1058
鱼传尺愫
鱼传尺愫 2020-12-14 04:56

I can do this in Objective-C on the iPhone, but now I\'m looking for the equivalent Android Java code. I can also do it in plain Java, but I don\'t know what the Android spe

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-14 05:43

    You don't need to use graphics.

    A simpler approach would be to create a FrameLayout with two elements- the ImageView for the image, and another view for whatever you want drawn on top.

    
    
    
        
    
        
    
    
    

    Of course, the thing on top of the image doesn't need to be a simple TextView, it can be another image, or another layout containing whatever arbitrary elements you like.

提交回复
热议问题