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

[Android] Initial selection #67

Open
sn4f opened this issue May 17, 2022 · 4 comments
Open

[Android] Initial selection #67

sn4f opened this issue May 17, 2022 · 4 comments

Comments

@sn4f
Copy link

sn4f commented May 17, 2022

Hello, thanks for the package!
Is it possible to set 100% width of the cropping area on init? On iOS it's fine

@dudkevych
Copy link

Hello, the same on android...
And the image works in the resizeMode="contain" mode, while ios, on the contrary, "cover"

@phongnguyenmaster
Copy link

phongnguyenmaster commented Feb 4, 2023

You can edit library file here:
Search file: ImageCropViewManager.kt

@ReactProp(name = SOURCE_URL_PROP)
fun setSourceUrl(view: CropImageView, url: String?) {
    url?.let {
        view.setImageUriAsync(Uri.parse(it))
        view.setMinCropResultSize(10000, 10000);
        Timer().schedule(2000) {
            view.setMinCropResultSize(0, 0);
        }

    }
}

@liuyanhang2004
Copy link

@ReactProp(name = SOURCE_URL_PROP)
fun setSourceUrl(view: CropImageView, url: String?) {
    url?.let {
        view.setImageUriAsync(Uri.parse(it))
        view.setMinCropResultSize(10000, 10000);
        Timer().schedule(object : TimerTask() {
            override fun run() {
                view.setMinCropResultSize(0, 0)
            }
        }, 2000)
    }
}

@Gabotron-ES
Copy link

How to implement this? Editing native code is not good idea

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

5 participants