[Android] TV: Show current browser selection

Geoffrey Métais git at videolan.org
Tue Aug 8 17:40:15 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Aug  8 17:07:46 2017 +0200| [29619074a3f6f592413e590c28675e0a1b1edcc6] | committer: Geoffrey Métais

TV: Show current browser selection

> https://code.videolan.org/videolan/vlc-android/commit/29619074a3f6f592413e590c28675e0a1b1edcc6
---

 .../src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java      | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
index 9cac2eff5..6a7be6c85 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
@@ -44,6 +44,7 @@ import org.videolan.vlc.VLCApplication;
 import org.videolan.vlc.databinding.BrowserItemBinding;
 import org.videolan.vlc.databinding.BrowserItemSeparatorBinding;
 import org.videolan.vlc.gui.helpers.UiTools;
+import org.videolan.vlc.util.AndroidDevices;
 import org.videolan.vlc.util.MediaItemFilter;
 import org.videolan.vlc.util.Util;
 
@@ -156,6 +157,13 @@ public class BaseBrowserAdapter extends SortableAdapter<MediaLibraryItem, BaseBr
                     return true;
                 }
             });
+            if (AndroidDevices.isAndroidTv())
+                itemView.setOnFocusChangeListener(new View.OnFocusChangeListener() {
+                    @Override
+                    public void onFocusChange(View view, boolean b) {
+                        setViewBackground(b, false);
+                    }
+                });
         }
 
         void setContextMenuListener() {



More information about the Android mailing list