From 8270aaa2f2a1a0de92352c6a92cd0e00d5db8e88 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 19 Jun 2018 23:23:18 +0200 Subject: [PATCH] replace bottom actions Properties button with Add to favorites --- .../gallery/activities/PhotoVideoActivity.kt | 9 +++------ .../gallery/activities/ViewPagerActivity.kt | 5 ++--- app/src/main/res/layout/bottom_actions.xml | 6 +++--- 3 files changed, 8 insertions(+), 12 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 6ef5ae6bc..516b24a16 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -136,7 +136,7 @@ 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" && !config.bottomActions - findItem(R.id.menu_properties).isVisible = mUri?.scheme == "file" && !config.bottomActions + findItem(R.id.menu_properties).isVisible = mUri?.scheme == "file" findItem(R.id.menu_share).isVisible = !config.bottomActions } @@ -178,9 +178,8 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList } private fun initBottomActionButtons() { - bottom_properties.setOnClickListener { - showProperties() - } + bottom_favorite.beGone() + bottom_delete.beGone() bottom_edit.setOnClickListener { openEditor(mUri!!.toString()) @@ -189,8 +188,6 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList bottom_share.setOnClickListener { sharePath(mUri!!.toString()) } - - bottom_delete.beGone() } override fun fragmentClicked() { 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 7e25ad59c..a357ff1b6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -276,7 +276,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View val currentMedium = getCurrentMedium() ?: return true menu.apply { - findItem(R.id.menu_properties).isVisible = !config.bottomActions findItem(R.id.menu_delete).isVisible = !config.bottomActions findItem(R.id.menu_share).isVisible = !config.bottomActions findItem(R.id.menu_edit).isVisible = !config.bottomActions @@ -746,8 +745,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun initBottomActionButtons() { - bottom_properties.setOnClickListener { - showProperties() + bottom_favorite.setOnClickListener { + } bottom_edit.setOnClickListener { diff --git a/app/src/main/res/layout/bottom_actions.xml b/app/src/main/res/layout/bottom_actions.xml index dec089e89..23eed6ae2 100644 --- a/app/src/main/res/layout/bottom_actions.xml +++ b/app/src/main/res/layout/bottom_actions.xml @@ -10,12 +10,12 @@ android:paddingTop="@dimen/medium_margin"> @@ -29,7 +29,7 @@ android:src="@drawable/ic_edit" app:layout_constraintEnd_toStartOf="@+id/bottom_share" app:layout_constraintHorizontal_bias="0.5" - app:layout_constraintStart_toEndOf="@+id/bottom_properties"/> + app:layout_constraintStart_toEndOf="@+id/bottom_favorite"/>