Commit fe7cd352 by wukun

0905

parent c120d69a
......@@ -33,8 +33,13 @@ public class ImageFileCropEngine implements CropFileEngine {
UCrop.Options options = buildOptions(fragment);
UCrop uCrop = UCrop.of(srcUri, destinationUri, dataSource);
options.withAspectRatio(1, 1);
float x = 0;
if (isFree){
x = 1.5F;
}else{
x = 1;
}
options.withAspectRatio(x, 1);
options.setHideBottomControls(true);
options.setCropOutputPathDir(fragment.requireActivity().getFilesDir().getAbsolutePath()
......@@ -48,20 +53,14 @@ public class ImageFileCropEngine implements CropFileEngine {
}
private UCrop.Options buildOptions(Fragment fragment) {
float x = 0;
if (isFree){
x = 1.5F;
}else{
x = 1;
}
UCrop.Options options = new UCrop.Options();
// options.setHideBottomControls(!cb_hide.isChecked());
// options.setFreeStyleCropEnabled(isFree);
// options.setShowCropFrame(cb_showCropFrame.isChecked());
// options.setShowCropGrid(cb_showCropGrid.isChecked());
// options.setCircleDimmedLayer(cb_crop_circular.isChecked());
options.withAspectRatio(x, 1);
options.setHideBottomControls(true);
// options.withAspectRatio(1, 1);
// options.setHideBottomControls(true);
// options.setCropOutputPathDir(getApplication().getFilesDir().getAbsolutePath() + "/wkCrop");
// options.setCropOutputFileName(System.currentTimeMillis() + ".png");
options.setStatusBarColor(ContextCompat.getColor(fragment.getContext(), R.color.white));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment