Commit 03704c11 authored by Adrien Maglo's avatar Adrien Maglo
Browse files

SlidingPaneLayout: remove useless code

parent 8a13e7e7
......@@ -558,36 +558,6 @@ public class SlidingPaneLayout extends ViewGroup {
}
catch (IllegalArgumentException ex) { }
final int action = ev.getAction();
switch (action & MotionEventCompat.ACTION_MASK) {
case MotionEvent.ACTION_DOWN: {
final float x = ev.getX();
final float y = ev.getY();
mInitialMotionX = x;
mInitialMotionY = y;
break;
}
case MotionEvent.ACTION_UP: {
final float x = ev.getX();
final float y = ev.getY();
final float dx = x - mInitialMotionX;
final float dy = y - mInitialMotionY;
final int slop = mDragHelper.getTouchSlop();
if (dx * dx + dy * dy < slop * slop &&
mDragHelper.isViewUnder(mSlideableView, (int) x, (int) y)) {
// Close or open the pane on touch event.
if (getState() == STATE_OPENED)
closePane();
else if (getState() == STATE_CLOSED)
openPane();
break;
}
break;
}
}
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment