Yalantis / uCrop

Image Cropping Library for Android
https://yalantis.com/blog/introducing-ucrop-our-own-image-cropping-library-for-android/
11.88k stars 2.16k forks source link

Xiaomi issue with crop drawable #810

Open Aeonko opened 2 years ago

Aeonko commented 2 years ago

On Xiaomi devices default crop drawable is not changing color for dark mode. This issue is most likely due to using .png as drawable. Switching to .svg fixes this issue. It would be nice to have this behavior as default, but for now we can fix it by passing new drawable for it.

val options = UCrop.Options()

    options.setToolbarCropDrawable(R.drawable.ic_check_mark)
    val uCrop = UCrop.of(uriOfImageToCrop, outPutOfCropedImage)
        .withOptions(
            options
        )

    uCrop.start(activity, CROPED_IMAGE)

All other brans are showing correct color for crop drawable