mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
squid:SwitchLastCaseIsDefaultCheck - switch statements should end with a default clause (#306)
This commit is contained in:
parent
26f4f53ec2
commit
8086d1db46
1 changed files with 17 additions and 9 deletions
|
@ -1567,9 +1567,6 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
final int hgrav = lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK;
|
final int hgrav = lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK;
|
||||||
final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK;
|
final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK;
|
||||||
switch (hgrav) {
|
switch (hgrav) {
|
||||||
default:
|
|
||||||
childLeft = paddingLeft;
|
|
||||||
break;
|
|
||||||
case Gravity.LEFT:
|
case Gravity.LEFT:
|
||||||
childLeft = paddingLeft;
|
childLeft = paddingLeft;
|
||||||
paddingLeft += child.getMeasuredWidth();
|
paddingLeft += child.getMeasuredWidth();
|
||||||
|
@ -1582,11 +1579,11 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
childLeft = width - paddingRight - child.getMeasuredWidth();
|
childLeft = width - paddingRight - child.getMeasuredWidth();
|
||||||
paddingRight += child.getMeasuredWidth();
|
paddingRight += child.getMeasuredWidth();
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
childLeft = paddingLeft;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
switch (vgrav) {
|
switch (vgrav) {
|
||||||
default:
|
|
||||||
childTop = paddingTop;
|
|
||||||
break;
|
|
||||||
case Gravity.TOP:
|
case Gravity.TOP:
|
||||||
childTop = paddingTop;
|
childTop = paddingTop;
|
||||||
paddingTop += child.getMeasuredHeight();
|
paddingTop += child.getMeasuredHeight();
|
||||||
|
@ -1599,6 +1596,9 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
childTop = height - paddingBottom - child.getMeasuredHeight();
|
childTop = height - paddingBottom - child.getMeasuredHeight();
|
||||||
paddingBottom += child.getMeasuredHeight();
|
paddingBottom += child.getMeasuredHeight();
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
childTop = paddingTop;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
childTop += scrollY;
|
childTop += scrollY;
|
||||||
child.layout(childLeft, childTop,
|
child.layout(childLeft, childTop,
|
||||||
|
@ -1733,9 +1733,6 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK;
|
final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK;
|
||||||
int childTop;
|
int childTop;
|
||||||
switch (vgrav) {
|
switch (vgrav) {
|
||||||
default:
|
|
||||||
childTop = paddingTop;
|
|
||||||
break;
|
|
||||||
case Gravity.TOP:
|
case Gravity.TOP:
|
||||||
childTop = paddingTop;
|
childTop = paddingTop;
|
||||||
paddingTop += child.getHeight();
|
paddingTop += child.getHeight();
|
||||||
|
@ -1748,6 +1745,9 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
childTop = height - paddingBottom - child.getMeasuredHeight();
|
childTop = height - paddingBottom - child.getMeasuredHeight();
|
||||||
paddingBottom += child.getMeasuredHeight();
|
paddingBottom += child.getMeasuredHeight();
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
childTop = paddingTop;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
childTop += scrollY;
|
childTop += scrollY;
|
||||||
|
|
||||||
|
@ -1999,6 +1999,8 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
case MotionEventCompat.ACTION_POINTER_UP:
|
case MotionEventCompat.ACTION_POINTER_UP:
|
||||||
onSecondaryPointerUp(ev);
|
onSecondaryPointerUp(ev);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mVelocityTracker == null) {
|
if (mVelocityTracker == null) {
|
||||||
|
@ -2133,6 +2135,8 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
mLastMotionY = MotionEventCompat.getY(ev,
|
mLastMotionY = MotionEventCompat.getY(ev,
|
||||||
MotionEventCompat.findPointerIndex(ev, mActivePointerId));
|
MotionEventCompat.findPointerIndex(ev, mActivePointerId));
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (needsInvalidate) {
|
if (needsInvalidate) {
|
||||||
ViewCompat.postInvalidateOnAnimation(this);
|
ViewCompat.postInvalidateOnAnimation(this);
|
||||||
|
@ -2606,6 +2610,8 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return handled;
|
return handled;
|
||||||
|
@ -2905,6 +2911,8 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} return false;
|
} return false;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue