-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Description
The method cropAndSaveImage() failed with an error.
java.lang.NullPointerException: ViewBitmap is null
binding.imageView.cropImageView.isRotateEnabled = false
binding.imageView.cropImageView.targetAspectRatio = 1.0f
binding.imageView.overlayView.setCircleDimmedLayer(true)
binding.imageView.cropImageView.setImageURI(uri)
binding.imageView.cropImageView.cropAndSaveImage(
Bitmap.CompressFormat.PNG,
100,
object : BitmapCropCallback {
override fun onBitmapCropped(
resultUri: Uri,
offsetX: Int,
offsetY: Int,
imageWidth: Int,
imageHeight: Int,
) {
setFragmentResult(
Constants.RequestCode.CROP_IMAGE,
bundleOf(Constants.ResultCode.RESULT to resultUri)
)
onBackPressed()
}
override fun onCropFailure(t: Throwable) {
handleError(t)
}
}
)
Metadata
Metadata
Assignees
Labels
No labels