From 949c4ce7dcf87ab406ea1a731bce852292b2da7a Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 14 Mar 2018 00:19:40 +0100 Subject: [PATCH] fix #695, fix a glitch with visible extended details, when they shouldnt be --- .../com/simplemobiletools/gallery/fragments/PhotoFragment.kt | 1 + .../com/simplemobiletools/gallery/fragments/VideoFragment.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index 8a5a3560e..6e65b49b9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -365,6 +365,7 @@ class PhotoFragment : ViewPagerFragment() { text = getMediumExtendedDetails(medium) setTextColor(context.config.textColor) beVisibleIf(text.isNotEmpty()) + alpha = if (!context!!.config.hideExtendedDetails || !isFullscreen) 1f else 0f onGlobalLayout { if (height != 0 && isAdded) { y = getExtendedDetailsY(height) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt index eb26d311f..4349441ec 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -75,12 +75,12 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee mIsFragmentVisible = true } + mIsFullscreen = activity!!.window.decorView.systemUiVisibility and View.SYSTEM_UI_FLAG_FULLSCREEN == View.SYSTEM_UI_FLAG_FULLSCREEN setupPlayer() if (savedInstanceState != null) { mCurrTime = savedInstanceState.getInt(PROGRESS) } - mIsFullscreen = activity!!.window.decorView.systemUiVisibility and View.SYSTEM_UI_FLAG_FULLSCREEN == View.SYSTEM_UI_FLAG_FULLSCREEN checkFullscreen() wasInit = true @@ -465,6 +465,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee text = getMediumExtendedDetails(medium) setTextColor(context.config.textColor) beVisibleIf(text.isNotEmpty()) + alpha = if (!context!!.config.hideExtendedDetails || !mIsFullscreen) 1f else 0f onGlobalLayout { if (height != 0 && isAdded) { y = getExtendedDetailsY(height)