Skip to content

Commit

Permalink
Fix crop offsets on Android 14 #535 #462
Browse files Browse the repository at this point in the history
  • Loading branch information
cvzi committed Jun 19, 2024
1 parent 5ce469d commit 43b9d25
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,11 @@ class PostCropActivity : GenericPostActivity() {
fullScreenIcon = R.drawable.ic_fullscreen
onShutter = {
// If there is a cutout or status bars, the view might have a offset
val selectorViewOffset = intArrayOf(0, 0)
getLocationOnScreen(selectorViewOffset)
it.offset(selectorViewOffset[0], selectorViewOffset[1])
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
val selectorViewOffset = intArrayOf(0, 0)
getLocationOnScreen(selectorViewOffset)
it.offset(selectorViewOffset[0], selectorViewOffset[1])
}
cutOutRect = it
visibility = View.GONE
storeBitmap(singleImage.bitmap)
Expand Down

0 comments on commit 43b9d25

Please sign in to comment.