SWIPE DETECTION:
linear2.setOnTouchListener(new View.OnTouchListener() {@Override public boolean
onTouch(View p1, MotionEvent p2){ switch(p2.getAction()) { case
MotionEvent.ACTION_DOWN: f = p2.getX();break; case MotionEvent.ACTION_UP: t =
p2.getX();if (((f - t) < -250)) {_slideLeft();} if (((t - f) < -250)) {_slideRight();}break;}return
true;}});
0 Comments: