简体   繁体   中英

Canvas Draw Text is not showing text on real device/emulator

I have used canvas.drawText("1"....), but it shows differently on real device and emulator. Layout Editor shows '1' correctly Here

But on device/emulator it shows like this

I tried disabling hardware acceleration in manifest file but it doesn't work.

I also tried "text" string, same thing happened layout editor / device&emulator

I just find the solution, I was using Paint.Style.STROKE, I changed it to fill with paint.setStyle(Paint.Style.FILL); and it solved my problem

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM