【发布时间】:2012-06-29 19:42:28
【问题描述】:
我正在尝试让这段代码工作:
http://scanplaygames.com/?p=168
(也在stackoverflow上):
Adding GestureOverlayView to my SurfaceView class, how to add to view hierarchy?
我运行了代码并添加了打印预测的标签。
public void onGesturePerformed(GestureOverlayView overlay, Gesture gesture)
{
// TODO Auto-generated method stub
ArrayList<Prediction> predictions = mLibrary.recognize(gesture);
Log.d(TAG, predictions.toString());
... 之后,当我绘制手势时,会打印出一个空数组。
我做错了什么?我怎么知道正在绘制哪些手势?这种方法是如何工作的?
另外,我的手势文件可能有问题吗?我只是不确定。
非常感谢。
【问题讨论】:
标签: java android gesture gestures prediction