diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/EditActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/EditActivity.kt index 3cd9667d0..bdcc630f5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/EditActivity.kt @@ -113,7 +113,6 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } (bottom_editor_crop_rotate_actions.layoutParams as RelativeLayout.LayoutParams).addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 1) - loadCropImageView() setupCropRotateActionButtons() setupAspectRatioButtons() @@ -128,22 +127,22 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener lastOtherAspectRatio = Pair(config.lastEditorCropOtherAspectRatioX, config.lastEditorCropOtherAspectRatioY) } + updateAspectRatio(config.lastEditorCropAspectRatio) crop_image_view.guidelines = CropImageView.Guidelines.ON - bottom_aspect_ratios.beVisible() + loadCropImageView() } private fun loadCropImageView() { crop_image_view.apply { - beVisible() setOnCropImageCompleteListener(this@EditActivity) setImageUriAsync(uri) guidelines = CropImageView.Guidelines.ON if (shouldCropSquare()) { - currAspectRatio = ASPECT_RATIO_ONE_ONE + updateAspectRatio(ASPECT_RATIO_ONE_ONE) setFixedAspectRatio(true) - bottom_aspect_ratio.beGone() + bottom_aspect_ratios.beGone() } } } @@ -312,7 +311,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } if (saveUri.scheme == "file") { - saveBitmapToFile(bitmap, saveUri.path!!, true) + saveBitmapToFile(bitmap, saveUri.path!!) } else { var inputStream: InputStream? = null var outputStream: OutputStream? = null @@ -339,7 +338,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } } - private fun saveBitmapToFile(bitmap: Bitmap, path: String, showSavingToast: Boolean) { + private fun saveBitmapToFile(bitmap: Bitmap, path: String) { if (!packageName.contains("slootelibomelpmis".reversed(), true)) { if (baseConfig.appRunCount > 100) { val label = "sknahT .moc.slootelibomelpmis.www morf eno lanigiro eht daolnwod ytefas nwo ruoy roF .ppa eht fo noisrev ekaf a gnisu era uoY".reversed() @@ -358,7 +357,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener val fileDirItem = FileDirItem(path, path.getFilenameFromPath()) getFileOutputStream(fileDirItem, true) { if (it != null) { - saveBitmap(file, bitmap, it, showSavingToast) + saveBitmap(file, bitmap, it) } else { toast(R.string.image_editing_failed) } @@ -372,10 +371,8 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } @TargetApi(Build.VERSION_CODES.N) - private fun saveBitmap(file: File, bitmap: Bitmap, out: OutputStream, showSavingToast: Boolean) { - if (showSavingToast) { - toast(R.string.saving) - } + private fun saveBitmap(file: File, bitmap: Bitmap, out: OutputStream) { + toast(R.string.saving) if (resizeWidth > 0 && resizeHeight > 0) { val resized = Bitmap.createScaledBitmap(bitmap, resizeWidth, resizeHeight, false) diff --git a/app/src/main/res/drawable/ic_aspect_ratio_vector.xml b/app/src/main/res/drawable/ic_aspect_ratio_vector.xml deleted file mode 100644 index 4f30d2612..000000000 --- a/app/src/main/res/drawable/ic_aspect_ratio_vector.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_crop_rotate_vector.xml b/app/src/main/res/drawable/ic_crop_rotate_vector.xml deleted file mode 100644 index 09059a8b4..000000000 --- a/app/src/main/res/drawable/ic_crop_rotate_vector.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_draw_vector.xml b/app/src/main/res/drawable/ic_draw_vector.xml deleted file mode 100644 index 4ad8e70ee..000000000 --- a/app/src/main/res/drawable/ic_draw_vector.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_photo_filter_vector.xml b/app/src/main/res/drawable/ic_photo_filter_vector.xml deleted file mode 100644 index 7bf8aa41a..000000000 --- a/app/src/main/res/drawable/ic_photo_filter_vector.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/layout/activity_edit.xml b/app/src/main/res/layout/activity_edit.xml index fbebb78bf..a4335621e 100644 --- a/app/src/main/res/layout/activity_edit.xml +++ b/app/src/main/res/layout/activity_edit.xml @@ -32,6 +32,7 @@ layout="@layout/bottom_editor_crop_rotate_actions" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentBottom="true" /> + android:layout_alignParentBottom="true" + android:layout_marginBottom="@dimen/medium_margin" /> diff --git a/app/src/main/res/layout/bottom_editor_crop_rotate_actions.xml b/app/src/main/res/layout/bottom_editor_crop_rotate_actions.xml index 24aec2005..37a93cbcb 100644 --- a/app/src/main/res/layout/bottom_editor_crop_rotate_actions.xml +++ b/app/src/main/res/layout/bottom_editor_crop_rotate_actions.xml @@ -1,5 +1,6 @@ - - -