如何从Android Image Cropper库获取两个请求代码?

我使用此代码从以下位置设置我的裁剪图像:

com.theartofdev.edmodo:android-image-cropper:2.8。+
    @Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
    if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
        CropImage.ActivityResult result = CropImage.getActivityResult(data);
        if (resultCode == RESULT_OK && result != null) {
            Uri resultUri = result.getUri();
            Log.d("TAG", "onActivityResult: uri is "+resultUri);
            CropClassResults.setUri(resultUri);

        } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {
            Exception error = result.getError();
            Log.d("TAG", "onActivityResult: uri error is "+error.getMessage());
        }
    }

    super.onActivityResult(requestCode, resultCode, data);
}

现在,我尝试再次使用来自不同作物图像操作的作物库,并将数据设置为同一类,但是系统返回错误,我如何采用不同的请求代码?

评论