import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
-import android.support.v4.app.DialogFragment;
+import androidx.fragment.app.DialogFragment;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
float scaleFactor = mExportWidth / (float) mOriginalBounds.width();
Intent processIntent = ProcessingService.getSaveIntent(activity, MasterImage
.getImage().getPreset(), dest, activity.getSelectedImageUri(), sourceUri,
- true, mSeekBar.getProgress(), scaleFactor);
+ true, mSeekBar.getProgress(), scaleFactor, false);
activity.startService(processIntent);
dismiss();
break;
return;
}
mEditing = true;
- int width = 0;
- int height = 0;
+ int width = 1;
+ int height = 1;
if (text.getId() == R.id.editableWidth) {
if (mWidthText.getText() != null) {
String value = String.valueOf(mWidthText.getText());
width = mOriginalBounds.width();
mWidthText.setText("" + width);
}
+ if (width <= 0) {
+ width = (int) Math.ceil(mRatio);
+ mWidthText.setText("" + width);
+ }
height = (int) (width / mRatio);
}
mHeightText.setText("" + height);
height = mOriginalBounds.height();
mHeightText.setText("" + height);
}
+ if (height <= 0) {
+ height = 1;
+ mHeightText.setText("" + height);
+ }
width = (int) (height * mRatio);
}
mWidthText.setText("" + width);