[Android] Android TV browser: refresh header buttons visibility upon header loading

Nicolas Pomepuy git at videolan.org
Tue Sep 13 12:01:01 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Sep 12 09:28:56 2022 +0200| [1168045ed0d53e5da8320c426a3bb3a3dffeb941] | committer: Duncan McNamara

Android TV browser: refresh header buttons visibility upon header loading

Fixes #2680

> https://code.videolan.org/videolan/vlc-android/commit/1168045ed0d53e5da8320c426a3bb3a3dffeb941
---

 .../java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt   | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt b/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt
index ab1dd1038..536d63776 100644
--- a/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt
@@ -118,6 +118,9 @@ class FileBrowserTvFragment : BaseBrowserTvFragment<MediaLibraryItem>(), PathAda
         viewModel.provider.liveHeaders.observe(viewLifecycleOwner) {
             updateHeaders(it)
             binding.list.invalidateItemDecorations()
+            animationDelegate.setVisibility(binding.imageButtonHeader, if (viewModel.provider.headers.isEmpty) View.GONE else View.VISIBLE)
+            animationDelegate.setVisibility(binding.headerButton, if (viewModel.provider.headers.isEmpty) View.GONE else View.VISIBLE)
+            animationDelegate.setVisibility(binding.headerDescription, if (viewModel.provider.headers.isEmpty) View.GONE else View.VISIBLE)
         }
 
         (viewModel.provider as BrowserProvider).loading.observe(viewLifecycleOwner) {



More information about the Android mailing list