I am not sure if I understood correctly.But, I guess you are looking for gesture detection. In that case set onTouchListener for it and Override onTouchListener
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction())
{
case MotionEvent.ACTION_DOWN:
{
canHandleMove=true;
lastY = touchevent.getY();
Log.d("tag", "touch down at "+lastX);
break;
}
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_MOVE:
{
if(canHandleMove)
{
canHandleMove=false;
float currentY = event.getY();
Log.d("tag", "touch up at "+currentY);
float diff=((lastY<currentY)?(currentY-lastY):(lastY-currentY));
if(diff>10)
{
if (lastY < currentY)
{
// Move Up
}
if (lastY > currentY)
{
// Move Down
}
}
break;
}
}
}
return true;
}