|
|
@@ -8,7 +8,6 @@ import android.support.v7.widget.LinearSnapHelper;
|
|
|
import android.support.v7.widget.OrientationHelper;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.util.DisplayMetrics;
|
|
|
-import android.util.Log;
|
|
|
import android.view.View;
|
|
|
import android.view.animation.DecelerateInterpolator;
|
|
|
import android.widget.Scroller;
|
|
|
@@ -46,7 +45,7 @@ public class Snapper extends LinearSnapHelper {
|
|
|
|
|
|
@Override
|
|
|
public boolean onFling(int velocityX, int velocityY) {
|
|
|
- Log.w("APP# Snapper | onFling", "|" + "velociyX: " + velocityX);
|
|
|
+// Log.w("APP# Snapper | onFling", "|" + "velocityX: " + velocityX);
|
|
|
Scroller mGravityScroller = new Scroller(recyclerView.getContext(), new DecelerateInterpolator());
|
|
|
mGravityScroller.fling(0, 0, velocityX, velocityY, Integer.MIN_VALUE, Integer.MAX_VALUE, Integer.MIN_VALUE, Integer.MAX_VALUE);
|
|
|
// Log.w("APP# MainBannerView | onFling", "| " + mGravityScroller.getFinalX());
|
|
|
@@ -76,7 +75,7 @@ public class Snapper extends LinearSnapHelper {
|
|
|
}
|
|
|
|
|
|
int targetPosition = findTargetSnapPosition(layoutManager, velocityX, velocityY);
|
|
|
- Log.w("APP# Snapper | snapFromFling2", "|" + "targetPosition: " + targetPosition);
|
|
|
+// Log.w("APP# Snapper | snapFromFling2", "|" + "targetPosition: " + targetPosition);
|
|
|
if (targetPosition == RecyclerView.NO_POSITION) {
|
|
|
return false;
|
|
|
}
|
|
|
@@ -141,7 +140,7 @@ public class Snapper extends LinearSnapHelper {
|
|
|
}
|
|
|
|
|
|
int deltaJump = layoutManager.canScrollVertically() ? vDeltaJump : hDeltaJump;
|
|
|
- Log.i("APP# Snapper | findTargetSnapPosition", "|" + "deltaJump: " + deltaJump);
|
|
|
+// Log.i("APP# Snapper | findTargetSnapPosition", "|" + "deltaJump: " + deltaJump);
|
|
|
if (deltaJump == 0) {
|
|
|
return RecyclerView.NO_POSITION;
|
|
|
}
|