手势中的多笔画不起作用

发布于 2024-12-23 05:30:11 字数 602 浏览 2 评论 0原文

我尝试以手势实现多笔画,但它不起作用。

我的问题是,我想使用手势绘制多笔画,但是当我完成一笔画并尝试绘制另一笔画时,前一笔画消失了。我设置了以下设置,但它们不起作用。

android:gestureStrokeType="multiple"
android:eventsInterceptionEnabled="true"
android:fadeEnabled="false"

这是我的 XML 文件

<android.gesture.GestureOverlayView
    android:layout_margin="5dp"
    android:id="@+id/SeeAndDrawGesture"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:gestureStrokeType="multiple"
    android:uncertainGestureColor="#FF4040" >
</android.gesture.GestureOverlayView>

I have tried to implement Multiple Strokes in gesture but it does not work.

My question is, I want to draw multiple stroke using gesture but when I finish drawing one stroke and try to draw another the previous one disappears. I set the following settings but they don't work.

android:gestureStrokeType="multiple"
android:eventsInterceptionEnabled="true"
android:fadeEnabled="false"

This is my XML file

<android.gesture.GestureOverlayView
    android:layout_margin="5dp"
    android:id="@+id/SeeAndDrawGesture"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:gestureStrokeType="multiple"
    android:uncertainGestureColor="#FF4040" >
</android.gesture.GestureOverlayView>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

老娘不死你永远是小三 2024-12-30 05:30:11

尝试使用:

android:fadeOffset="in miliseconds"

对我有用

try using:

android:fadeOffset="in miliseconds"

works for me

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文