[Android] Cleaning

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


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

Cleaning

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

 vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java b/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
index 09a638c49..64d7470a4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
@@ -35,7 +35,6 @@ import android.support.v17.leanback.widget.Row;
 import android.support.v4.content.ContextCompat;
 import android.support.v4.util.LruCache;
 import android.text.TextUtils;
-import android.view.View;
 
 import org.videolan.medialibrary.media.MediaLibraryItem;
 import org.videolan.medialibrary.media.MediaWrapper;
@@ -62,10 +61,9 @@ import static org.videolan.vlc.gui.tv.browser.MusicFragment.CATEGORY_ALBUMS;
 public class TvUtil {
 
     public static void applyOverscanMargin(Activity activity) {
-        View content = activity.findViewById(android.R.id.content);
-        int hm = activity.getResources().getDimensionPixelSize(R.dimen.tv_overscan_horizontal);
-        int vm = activity.getResources().getDimensionPixelSize(R.dimen.tv_overscan_vertical);
-        content.setPadding(hm, vm, hm, vm);
+        final int hm = activity.getResources().getDimensionPixelSize(R.dimen.tv_overscan_horizontal);
+        final int vm = activity.getResources().getDimensionPixelSize(R.dimen.tv_overscan_vertical);
+        activity.findViewById(android.R.id.content).setPadding(hm, vm, hm, vm);
     }
 
     public static void playMedia(Activity activity, MediaWrapper media){



More information about the Android mailing list