Skip to content

Commit

Permalink
Merge branch 'release/v1.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
helloyako committed Feb 20, 2017
2 parents 3ac6d50 + 174e501 commit 3bd826d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_NAME=1.2.0
VERSION_CODE=8
VERSION_NAME=1.2.1
VERSION_CODE=9
GROUP=com.naver.android.helloyako

POM_DESCRIPTION=Android Image Crop View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import android.os.Handler;
import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
Expand Down Expand Up @@ -965,6 +966,20 @@ public void setGridOuterMode(int gridOuterMode) {
invalidate();
}

public void setGridLeftRightMargin(int marginDP) {
this.gridLeftRightMargin = dpToPixel(marginDP);
requestLayout();
}

public void setGridTopBottomMargin(int marginDP) {
this.gridTopBottomMargin = dpToPixel(marginDP);
requestLayout();
}

private int dpToPixel(int dp) {
return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, getResources().getDisplayMetrics());
}

public void saveState() {
savedAspectRatioWidth = mAspectRatioWidth;
savedAspectRatioHeight = mAspectRatioHeight;
Expand Down

0 comments on commit 3bd826d

Please sign in to comment.