如何持久化GestureOverLayView的手势?
假设我在 GestureOverlayView 中写一个单词“abc”,同时我需要保存屏幕中的所有这些字母,直到按下清除按钮。谁能告诉我我有一个好方法来做到这一点.. 我会写“a”,它被视为一个手势(而不是笔划),即我想到的一件事是在 GestureOverLayView 的底部使用 ImageView 或 SurfaceView 。假设当我在 GestureOverLayView 上绘制“a”时,在“onGesturePerformed”事件中它将采用手势,然后获取笔画,然后将它们转换为路径,然后将路径绘制到底层 ImageView 上或 SurfaceView。任何人都可以建议我代码或指导我。我尝试了它们的各种组合,但无法解决它。
Suppose I am writing a word "abc" in my GestureOverlayView and while doing so I need to save all those alphabets in the screen until I press a clear button.Can anyone tell me a good way to do this..
I will write "a" which is taken as a gesture (not as stroke) i.e One thing I though of was like use a ImageView or SurfaceView on bottom of a GestureOverLayView.and Suppose when I draw "a" on GestureOverLayView then in the "onGesturePerformed" event it will take the Gesture and then get the strokes and then convert them into paths and then draw the paths onto the underlying ImageView or SurfaceView.Can anyone suggest me the code or guide me.I tried various combinations of them but couldn't solve it..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SDK 的示例目录中有一个名为 GestureBuilder 的应用程序。此应用程序展示了如何保留用户绘制的手势。
There's an app called GestureBuilder in the samples directory of the SDK. This app shows how to persist gestures drawn by the user.
我意识到这是一个老问题,但是您可以通过将 fadeOffset 增加到某个高得离谱的数字来“作弊”。这可以在 xml 中完成
,或者以编程方式完成,
I realize this is an old question, but you can "cheat" by increasing the fadeOffset to some ridiculously high number. This can be done either in the xml
whatever, or programatically,