I want to show the cropView to small size using Ucrop Library

460 Views Asked by At

I tried to set ucropView size shows when begin crop start but the default aspect ratios does not give this result i want to show the ucropView like the above picture

    Uri sourceUri = PIDUtility.getImgUri(source);
    Uri desiUri = PIDUtility.getImgUri(des);
    UCrop.Options options = new UCrop.Options();
    options.setFreeStyleCropEnabled(true);
    options.setMaxScaleMultiplier((float) 50);
    options.setToolbarTitle(title);

     UCrop.of(sourceUri, desiUri)
            .withAspectRatio(1, 1)
            .withOptions(options)
            .start(this);

I want result like this

1

There are 1 best solutions below

3
On

Use below code. give aspect ratio 16:9 and withmaxResultSize property .Might it helps to you.

 UCrop.of(sourceUri, desiUri)
         .withAspectRatio(16, 9)
         .withMaxResultSize(maxWidth, maxHeight)
         .start(this);