Skip to content

Commit

Permalink
PE-379 A bit cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanepechard authored and burhanrashid52 committed Jul 31, 2021
1 parent f2d2e2c commit 73dc181
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ public void onBitmapLoaded(@Nullable Bitmap sourceBitmap) {
private RelativeLayout.LayoutParams setupImageSource(@Nullable AttributeSet attrs) {
mImgSource.setId(imgSrcId);
mImgSource.setAdjustViewBounds(true);
//if (clipSourceImage) {
mImgSource.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
//}
mImgSource.setScaleType(ImageView.ScaleType.CENTER_INSIDE);

if (attrs != null) {
TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.PhotoEditorView);
Expand Down Expand Up @@ -129,10 +127,8 @@ private RelativeLayout.LayoutParams setupDrawingView() {
params.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
params.addRule(RelativeLayout.ALIGN_TOP, imgSrcId);
params.addRule(RelativeLayout.ALIGN_BOTTOM, imgSrcId);
//if (clipSourceImage) {
params.addRule(RelativeLayout.ALIGN_LEFT, imgSrcId);
params.addRule(RelativeLayout.ALIGN_RIGHT, imgSrcId);
//}
params.addRule(RelativeLayout.ALIGN_LEFT, imgSrcId);
params.addRule(RelativeLayout.ALIGN_RIGHT, imgSrcId);
return params;
}

Expand Down

0 comments on commit 73dc181

Please sign in to comment.