On single click onSingleTapUp function executes properly and while on doubleclick both onSingleTapUp and onDoubleTap executes.
mGestureDetector = new GestureDetector(new GestureDetector.SimpleOnGestureListener() {
@Override
public void onLongPress(MotionEvent e)
{
}
@Override
public boolean onDoubleTap(MotionEvent e)
{
cameracontrolslayout.setVisibility(RelativeLayout.GONE);
presetcontrolslayout.setVisibility(RelativeLayout.GONE);
ViewFLipperButtonsLayout.setVisibility(RelativeLayout.VISIBLE);
ptzcontrolslayout.setVisibility(RelativeLayout.VISIBLE);
return true;
}
@Override
public boolean onSingleTapUp(MotionEvent arg0)
{
// TODO Auto-generated method stub
cameracontrolslayout.setVisibility(RelativeLayout.VISIBLE);
presetcontrolslayout.setVisibility(RelativeLayout.VISIBLE);
return false;
}
@Override
public boolean onDown(MotionEvent e)
{
return true;
}
});
can anyone help me to solve this issue?
Instead of
onSingleTapUpwhy not use onSingleTapConfirmed, however you layout will be visible at the time of taping down.