Closed wqbs369 closed 6 years ago
<yanzhikai.textpath.AsyncTextPathView
android:id="@+id/atpv_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
app:autoStart="true"
app:duration="5000"
app:paintStrokeColor="@android:color/holo_orange_light"
app:pathStrokeColor="@android:color/holo_orange_light"
app:showPainter="true"
app:text="2018西安特检"
app:textSize="62sp" />
<yanzhikai.textpath.AsyncTextPathView
android:id="@+id/atpv_totond"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
app:autoStart="true"
app:duration="2500"
app:paintStrokeColor="@android:color/holo_orange_light"
app:pathStrokeColor="@android:color/holo_orange_light"
app:showPainter="true"
app:text="测试自动换行(abcdefghijk(lmnopqrst)uvwxyz)"
app:textSize="64sp" />
我这二个layout除了文字长度不一致,其它都一样,但是换行后,动画执行完成,会保留文字,而没有换行的,动画执行完文字消失。 上面view文字消失,下面的会保留
setLayerType(LAYER_TYPE_SOFTWARE,null);
)来解决这个问题。OK,谢谢了。
新的版本v0.2.1已经可以不通过关闭硬件加速解决这个问题了,可以试一下
这样的话,动画会直接执行,执行完文字消失。希望可以在动画view中添加动画执行结束监听