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

Custom request code #564

Closed
mac229 opened this issue Jun 26, 2018 · 2 comments
Closed

Custom request code #564

mac229 opened this issue Jun 26, 2018 · 2 comments

Comments

@mac229
Copy link

mac229 commented Jun 26, 2018

Add possibility to set custom request code (not only CROP_IMAGE_ACTIVITY_REQUEST_CODE) for multiple crop selections

@mughalasim
Copy link

I agree, is there a possibility to get the result and set it for different images .. Something like this

case RESULT_AVATAR:
                if (resultCode == RESULT_OK) {
                    Uri selectedImage = imageReturnedIntent.getData();
                    img_avatar.setImageURI(selectedImage);
                }

                break;
case RESULT_BANNER:
                if (resultCode == RESULT_OK) {
                    Uri selectedImage = imageReturnedIntent.getData();
                    img_banner.setImageURI(selectedImage);
                }
                break;

@mac229
Copy link
Author

mac229 commented Jun 27, 2018

Ok. I've made research and I was wrong. It is possible.

val intent = CropImage.activity().getIntent(context!!)
startActivityForResult(intent, CUSTOM_REQUEST_CODE)

@mac229 mac229 closed this as completed Jul 2, 2018
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