After much help from the good people here, I finally almost got my little game panel (thats a surfaceview class) up and running with a GestureOverlayView. Through the use of addView I finally was able to add the GestureOverlayView and get it to work, the trouble is that calling this:
/** create the login form */
private ViewGroup _createGameStuffs() {
GestureOverlayView gestures = new GestureOverlayView(this);
gestures.setOrientation(gestures.ORIENTATION_VERTICAL);
gestures.setEventsInterceptionEnabled(true);
gestures.setGestureStrokeType(gestures.GESTURE_STROKE_TYPE_MULTIPLE);
gestures.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT));
//GestureOverlayView gestures = (GestureOverlayView) findViewById(R.id.gestures);
gestures.addOnGesturePerformedListener(this);
Panel p = new Panel(this); //my game view
panel.addView(p,0); //add it to the group
panel.addView(gestures,1); //add the gestureoverlayview i made to the group
return panel;
}
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
mLibrary = GestureLibraries.fromRawResource(this, R.raw.myspells);
// create the panel to enclose everything
View mainPanel = _createGameStuffs();
// show the panel on the screen
setContentView(mainPanel);
//setContentView(p);
}
Depending upon which index I give which view takes presedence. This leads me to believe my game panel has to be added as a child view to the GestureOverlayView, is this correct? If so, how do I get at the children views of the GestureOverlayView? Or is it the other way around, GestureOverlayView becomes a child of my main view?