i have an application for which i use SimpleGestureFilter.java and what it does is calling the right function on swipe (left right double tap...etc) here is part of the code
@Override
public boolean dispatchTouchEvent(MotionEvent me){
// Call onTouchEvent of SimpleGestureFilter class
this.detector.onTouchEvent(me);
return super.dispatchTouchEvent(me);
}
public void onSwipe(int direction) {
String str = "";
switch (direction) {
case SimpleGestureFilter.SWIPE_RIGHT : minusOne(); str = "Swipe Right";
break;
case SimpleGestureFilter.SWIPE_LEFT : plusOne(); str = "Swipe Left";
break;
}
}
So what i want to do it when plusOne() is caled or some of the other functions it does something and it submits intent on the same MainActivity.java class , I am trying to achive when that event happens to look like a book page slide , to have somesort of transitions between screens altought it is only one MainActivity screen
Intent i = new Intent(this,MainActivity.class);
i.putExtra(DBAdapter.KEY_pk_ymd, Integer.parseInt(dt));
startActivityForResult(i,ACTIVITY_EDIT);