diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt index 10910fcab..6644e91c9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt @@ -115,19 +115,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } isCropIntent = intent.extras?.get(CROP) == "true" - - crop_image_view.apply { - setOnCropImageCompleteListener(this@EditActivity) - setImageUriAsync(uri) - guidelines = CropImageView.Guidelines.ON - - if (isCropIntent && shouldCropSquare()) { - currAspectRatio = ASPECT_RATIO_ONE_ONE - setFixedAspectRatio(true) - bottom_aspect_ratio.beGone() - } - } - + Glide.with(this).load(uri).into(default_image_view) setupBottomActions() } @@ -157,6 +145,20 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener return true } + private fun loadCropImageView() { + crop_image_view.apply { + setOnCropImageCompleteListener(this@EditActivity) + setImageUriAsync(uri) + guidelines = CropImageView.Guidelines.ON + + if (isCropIntent && shouldCropSquare()) { + currAspectRatio = ASPECT_RATIO_ONE_ONE + setFixedAspectRatio(true) + bottom_aspect_ratio.beGone() + } + } + } + private fun setupBottomActions() { setupPrimaryActionButtons() setupCropRotateActionButtons() diff --git a/app/src/main/res/layout/activity_edit.xml b/app/src/main/res/layout/activity_edit.xml index 30c0eaa05..a6b77522b 100644 --- a/app/src/main/res/layout/activity_edit.xml +++ b/app/src/main/res/layout/activity_edit.xml @@ -6,11 +6,18 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + +