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 6fd49ec86..5eb551382 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt @@ -147,7 +147,10 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } private fun flipImage(horizontally: Boolean) { - + if (horizontally) + crop_image_view.flipImageHorizontally() + else + crop_image_view.flipImageVertically() } private fun scanFinalPath(path: String) { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index bfa06e801..cbbdc4897 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -163,7 +163,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View findItem(R.id.menu_set_as_wallpaper).isVisible = getCurrentMedium()!!.isImage() == true findItem(R.id.menu_edit).isVisible = getCurrentMedium()!!.isImage() == true findItem(R.id.menu_rotate).isVisible = getCurrentMedium()!!.isImage() == true - findItem(R.id.menu_flip).isVisible = getCurrentMedium()!!.isImage() == true findItem(R.id.menu_save_as).isVisible = mRotationDegrees != 0f findItem(R.id.menu_rotate).subMenu.apply { @@ -187,8 +186,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View R.id.menu_move_to -> moveTo() R.id.menu_open_with -> openWith(getCurrentFile()) R.id.menu_share -> shareMedium(getCurrentMedium()!!) - R.id.menu_flip_horizontally -> flipImage(true) - R.id.menu_flip_vertically -> flipImage(false) R.id.menu_delete -> askConfirmDelete() R.id.menu_rename -> renameFile() R.id.menu_edit -> openEditor(getCurrentFile()) @@ -354,10 +351,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View super.onActivityResult(requestCode, resultCode, resultData) } - private fun flipImage(horizontally: Boolean) { - - } - private fun askConfirmDelete() { ConfirmationDialog(this) { deleteFileBg(File(mMedia[mPos].path)) { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt index fc9892059..ee9c44b50 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt @@ -191,6 +191,7 @@ fun SimpleActivity.removeNoMedia(path: String, callback: () -> Unit) { } fun Activity.getFileSignature(path: String) = StringSignature(File(path).lastModified().toString()) + fun Activity.loadImage(path: String, target: MySquareImageView) { if (path.isImageFast() || path.isVideoFast()) { if (path.isPng()) { diff --git a/app/src/main/res/menu/menu_viewpager.xml b/app/src/main/res/menu/menu_viewpager.xml index 3a7924597..807553576 100644 --- a/app/src/main/res/menu/menu_viewpager.xml +++ b/app/src/main/res/menu/menu_viewpager.xml @@ -34,20 +34,6 @@ android:icon="@drawable/ic_share" android:title="@string/share" app:showAsAction="ifRoom"/> - - - - - -