How to persist the gestures of the GestureOverLayView?

跟風遠走 提交于 2019-12-01 09:38:39

问题


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..


回答1:


There's an app called GestureBuilder in the samples directory of the SDK. This app shows how to persist gestures drawn by the user.




回答2:


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

android:fadeOffset = "some very large number"

whatever, or programatically,

yourgestureoverlayView.SetFadeOffset(some very large number in milliseconds)


来源:https://stackoverflow.com/questions/9383026/how-to-persist-the-gestures-of-the-gestureoverlayview

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!