标签: android canvas
我正在制作Android的互动故事编辑器,我目前的任务是制作带文字的对象。
如何将canvas.drawText限制为特定的矩形,并使文本换行边缘类似于CSS属性white-space: normal;?
white-space: normal;
目前:
(CSS中的效果相同)
预期:
答案 0 :(得分:0)
实现此类可以解决问题:https://gist.github.com/markusfisch/2655909#file-textrect-java