www.fgks.org   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use the Freestyle crop? #788

Closed
Superbia-zyb opened this issue Oct 19, 2021 · 1 comment
Closed

How can I use the Freestyle crop? #788

Superbia-zyb opened this issue Oct 19, 2021 · 1 comment

Comments

@Superbia-zyb
Copy link

[UCrop.of( photoUri, Uri.parse(newUri)) .start(PhotoDisplay.this);]
This code only gives me some options like "1:1" "3:2" and so on 。But I want to change the proportion freely 。How can I do this ?

@Superbia-zyb
Copy link
Author
Superbia-zyb commented Oct 20, 2021

I will close this issue because i find the resolution.
` UCrop uCrop = UCrop.of(uri,destinationUri);

    UCrop.Options options = new UCrop.Options();

    options.setAllowedGestures(UCropActivity.SCALE, UCropActivity.ROTATE, UCropActivity.ALL);

    //设置隐藏底部容器,默认显示
    options.setHideBottomControls(true);

    //设置toolbar颜色
    options.setToolbarColor(ActivityCompat.getColor(this, R.color.colorPrimary));

    //设置状态栏颜色
    options.setStatusBarColor(ActivityCompat.getColor(this, R.color.colorPrimary));

    //是否能调整裁剪框
    options.setFreeStyleCropEnabled(true);

    uCrop.withOptions(options);

    uCrop.start(this);`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants