【问题标题】:Canvas Draw Text is not showing text on real device/emulator画布绘制文本未在真实设备/模拟器上显示文本
【发布时间】:2018-11-28 12:00:18
【问题描述】:

我使用过 canvas.drawText("1"....),但它在真实设备和模拟器上的显示不同。布局编辑器正确显示“1”Here

但在设备/模拟器上显示为this

我尝试在清单文件中禁用硬件加速,但它不起作用。

我也试过“文本”字符串,同样的事情发生了layout editor/device&emulator

【问题讨论】:

  • 分享你的代码

标签: java android canvas drawtext


【解决方案1】:

我刚刚找到解决方案,我使用的是 Paint.Style.STROKE,我将其更改为使用 paint.setStyle(Paint.Style.FILL);它解决了我的问题

【讨论】:

    猜你喜欢
    • 2021-05-25
    • 1970-01-01
    • 2021-06-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-07
    • 1970-01-01
    相关资源
    最近更新 更多