android - adding a String over a Drawable image?

前端 未结 3 1579
猫巷女王i
猫巷女王i 2020-12-29 16:08

I\'m trying to add a String to a Drawable image. I\'m currently not using a Panel to draw and I\'d like to keep it that way. Any idea

3条回答
  •  清歌不尽
    2020-12-29 16:25

    If your resulted text looks "angular" due to resizing, it's better to use TextPaint instead of plain Paint with these parameters:

    TextPaint textPaint = new TextPaint(TextPaint.ANTI_ALIAS_FLAG | TextPaint.LINEAR_TEXT_FLAG);
    

提交回复
热议问题