From b0653ae2ccbd5a19b41c5d935a41b1f4147ef9b1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 1 Jul 2018 13:05:38 +0200 Subject: [PATCH] rotate image by 90 immediately after pressing the bottom action icon --- .../gallery/activities/ViewPagerActivity.kt | 15 +-------------- .../gallery/helpers/Constants.kt | 4 ---- 2 files changed, 1 insertion(+), 18 deletions(-) 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 ab0899e18..7794a1c91 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -28,12 +28,10 @@ import android.view.WindowManager import android.view.animation.DecelerateInterpolator import com.bumptech.glide.Glide import com.simplemobiletools.commons.dialogs.PropertiesDialog -import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.dialogs.RenameItemDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.models.FileDirItem -import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.adapters.MyPagerAdapter import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask @@ -800,18 +798,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View bottom_rotate.setOnClickListener { if (bottom_actions.alpha == 1f) { - val items = arrayListOf( - RadioItem(ROTATE_RIGHT, getString(R.string.rotate_right)), - RadioItem(ROTATE_LEFT, getString(R.string.rotate_left)), - RadioItem(ROTATE_ONE_EIGHTY, getString(R.string.rotate_one_eighty))) - - RadioGroupDialog(this, items) { - when (it as Int) { - ROTATE_RIGHT -> rotateImage(90) - ROTATE_LEFT -> rotateImage(270) - ROTATE_ONE_EIGHTY -> rotateImage(180) - } - } + rotateImage(90) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt index fc723b757..43db43df9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -131,10 +131,6 @@ const val GROUP_BY_EXTENSION = 16 const val GROUP_BY_FOLDER = 32 const val GROUP_DESCENDING = 1024 -const val ROTATE_RIGHT = 1 -const val ROTATE_LEFT = 2 -const val ROTATE_ONE_EIGHTY = 3 - // bottom actions const val BOTTOM_ACTION_TOGGLE_FAVORITE = 1 const val BOTTOM_ACTION_EDIT = 2