From 6a216fc67548f111c50117198c628b3883daa031 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 18 Jun 2018 09:02:12 +0200 Subject: [PATCH] handle bottom button action presses at the PhotoVideo activity --- .../gallery/activities/PhotoVideoActivity.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt index d1528b092..6741d334b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -135,8 +135,9 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList menu.apply { findItem(R.id.menu_set_as).isVisible = mMedium?.isImage() == true - findItem(R.id.menu_edit).isVisible = mMedium?.isImage() == true && mUri?.scheme == "file" - findItem(R.id.menu_properties).isVisible = mUri?.scheme == "file" + findItem(R.id.menu_edit).isVisible = mMedium?.isImage() == true && mUri?.scheme == "file" && !config.bottomActions + findItem(R.id.menu_properties).isVisible = mUri?.scheme == "file" && !config.bottomActions + findItem(R.id.menu_share).isVisible = !config.bottomActions } return true @@ -178,16 +179,18 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList private fun initBottomActionButtons() { bottom_properties.setOnClickListener { + showProperties() } bottom_edit.setOnClickListener { + openEditor(mUri!!.toString()) } bottom_share.setOnClickListener { + sharePath(mUri!!.toString()) } - bottom_delete.setOnClickListener { - } + bottom_delete.beGone() } override fun fragmentClicked() {