From a39b4ee459e14370d6c408f141c00cadc7ac30e5 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 17 Aug 2021 12:29:31 +0200 Subject: [PATCH] fix #2192, disable fullscreen bottom actions if invisible --- .../gallery/pro/activities/ViewPagerActivity.kt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt index 6a88c4d83..84611937e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt @@ -1282,14 +1282,11 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View (it as MyPagerAdapter).toggleFullscreen(mIsFullScreen) val newAlpha = if (mIsFullScreen) 0f else 1f top_shadow.animate().alpha(newAlpha).start() - if (bottom_actions.isVisible()) { - bottom_actions.animate().alpha(newAlpha).start() - arrayOf(bottom_favorite, bottom_edit, bottom_share, bottom_delete, bottom_rotate, bottom_properties, bottom_change_orientation, - bottom_slideshow, bottom_show_on_map, bottom_toggle_file_visibility, bottom_rename, bottom_set_as, bottom_copy, bottom_move, - bottom_resize).forEach { - it.isClickable = !mIsFullScreen - } - } + bottom_actions.animate().alpha(newAlpha).withStartAction { + bottom_actions.beVisible() + }.withEndAction { + bottom_actions.beVisibleIf(newAlpha == 1f) + }.start() } }