From 05e666890f31c82c9c41566e37998f61636b89c6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 14 Feb 2019 23:09:01 +0100 Subject: [PATCH] fix #1265, hide the Panorama button at fullscreen view --- .../gallery/pro/fragments/PhotoFragment.kt | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt index ea835b8e7..65885f31e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt @@ -515,6 +515,9 @@ class PhotoFragment : ViewPagerFragment() { } mView.panorama_outline.beVisibleIf(mIsPanorama) + if (mIsFullscreen) { + mView.panorama_outline.alpha = 0f + } } private fun getImageOrientation(): Int { @@ -611,14 +614,20 @@ class PhotoFragment : ViewPagerFragment() { override fun fullscreenToggled(isFullscreen: Boolean) { this.mIsFullscreen = isFullscreen - mView.photo_details.apply { - if (mStoredShowExtendedDetails && isVisible()) { - animate().y(getExtendedDetailsY(height)) + mView.apply { + photo_details.apply { + if (mStoredShowExtendedDetails && isVisible()) { + animate().y(getExtendedDetailsY(height)) - if (mStoredHideExtendedDetails) { - animate().alpha(if (isFullscreen) 0f else 1f).start() + if (mStoredHideExtendedDetails) { + animate().alpha(if (isFullscreen) 0f else 1f).start() + } } } + + if (mIsPanorama) { + panorama_outline.animate().alpha(if (isFullscreen) 0f else 1f).start() + } } }