totond / TextPathView

A View with text path animation!
MIT License
1.91k stars 214 forks source link

有没有办法实现自动换行 #6

Closed PaulZJ closed 6 years ago

PaulZJ commented 6 years ago

现在的实现应该是不支持文字自动换行的; 这个属性不支持的话,用起来很局限。。 有没有办法根据StaticLayout来得到文字的Path List?

totond commented 6 years ago

你好,现在的确是不支持自动换行的。 我看了下StaticLayout源码好像是没有直接返回Path List的方法,它的换行逻辑暂时还没时间去找出来。 所以我后续打算尝试直接检测Path宽度是否超过控件宽度,然后直接把超出的文字Path移动到下一行。 你觉得这样操作怎么样?有没有更好的想法呢,谢谢

totond commented 6 years ago

@PaulZJ 0.1.2版本已经支持文字自动换行