From 5c66bbcbca1cf9cc019aec246b4737a6a2bf5077 Mon Sep 17 00:00:00 2001 From: milind Date: Mon, 30 Dec 2019 15:53:28 +0530 Subject: [PATCH] margin fix --- .../src/main/java/com/matrixdev/mosaic/MosaicView.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mosaic/src/main/java/com/matrixdev/mosaic/MosaicView.java b/mosaic/src/main/java/com/matrixdev/mosaic/MosaicView.java index a8bd164..6f58b28 100644 --- a/mosaic/src/main/java/com/matrixdev/mosaic/MosaicView.java +++ b/mosaic/src/main/java/com/matrixdev/mosaic/MosaicView.java @@ -475,21 +475,21 @@ private void addViewAt(int offSetX, int offSetY, Canvas canvas) { } private int getMargin(int offSet) { - if (offSet % 50 == 0) { + if (offSet % fullOffset == 0) { if (offSet > 0) { - return 30 * (Math.abs(offSet) / fullOffset); + return 40 * (Math.abs(offSet) / fullOffset); } else if (offSet == 0) { return 0; } else { - return -30 * (Math.abs(offSet) / fullOffset); + return -40 * (Math.abs(offSet) / fullOffset); } } else { if (offSet > 0) { - return 15 * (Math.abs(offSet) / halfOffset); + return 20 * (Math.abs(offSet) / halfOffset); } else if (offSet == 0) { return 0; } else { - return -15 * (Math.abs(offSet) / halfOffset); + return -20 * (Math.abs(offSet) / halfOffset); } } }