public boolean onTouchEvent(MotionEvent touchevent){
switch ((touchevent.getAction())){
case MotionEvent.ACTION_DOWN:
{
x1=touchevent.getX();
break;
}
case MotionEvent.ACTION_UP:
{
x2 = touchevent.getX();
if (x1< x2){
//Toast.makeText(this," izquierda a derecha",Toast.LENGTH_SHORT).show();
Intent the = new Intent(getApplicationContext(),the_who.class);
startActivity(the);
}
if (x1>x2){
Toast.makeText(this,"derecha a izquierda",Toast.LENGTH_SHORT).show();
}
break;
}
}
return false;
}