とにかく、gesturebuilder を使用して作成されたジェスチャ ライブラリからジェスチャ ID のリストを取得し、それらを配列に格納されている画像にリンクする方法はありますか。画像はジェスチャ オーバーレイ ビューに追加されて使用されるため、表示されます。
各ジェスチャを画像にリンクしたいので、ある種の ID または名前が必要です。ジェスチャーのサンプルやその他のオンライン資料を調べましたが、この問題に関する情報はありません。
この問題について何か助けていただければ幸いです。
例:
//Link the images to the gesture ids, so when a user draws an "a", //it is linked to the gesture "a" if (sStore.load()) { for (String name : sStore.getGestureEntries()) { //Stores the gesture and its name into Gesture gesture for (Gesture gesture : sStore.getGestures(name)) { gesture.getID(); //link IDs to image_array[i] } } } //match the image and the gesture, after a touch event. if (predictions.size() > 0) { Prediction prediction = predictions.get(0); if(prediction.score > 1.0) { if(prediction.best_score == Current_Image) { Correct(); Next_image(); } } }