From aca83d7fadf3dde5864a0dce76f00aecba4b4e27 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 24 Oct 2017 21:18:33 +0200 Subject: [PATCH] hide the Extended details if text is empty --- .../com/simplemobiletools/gallery/fragments/PhotoFragment.kt | 2 +- .../com/simplemobiletools/gallery/fragments/VideoFragment.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 a96db9a4a..b865282d3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -275,7 +275,7 @@ class PhotoFragment : ViewPagerFragment() { view.photo_details.apply { text = getMediumExtendedDetails(medium) setTextColor(context.config.textColor) - beVisible() + beVisibleIf(text.isNotEmpty()) onGlobalLayout { if (height != 0) { val smallMargin = resources.getDimension(R.dimen.small_margin) 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 af1f02067..e271e0b90 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -505,7 +505,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee mView.video_details.apply { text = getMediumExtendedDetails(medium) setTextColor(context.config.textColor) - beVisible() + beVisibleIf(text.isNotEmpty()) onGlobalLayout { if (height != 0) { val smallMargin = resources.getDimension(R.dimen.small_margin)