[Android] Video player: Enforce black background
Geoffrey Métais
git at videolan.org
Tue Dec 3 10:36:23 CET 2019
vlc-android | branch: 3.2.x | Geoffrey Métais <geoffrey at videolan.org> | Tue Dec 3 09:24:34 2019 +0000| [93ffa30fe0ec375fab5f6c935fd83bf6e173648b] | committer: Geoffrey Métais
Video player: Enforce black background
Some shitty ROM change android.R.color.black to brown.
(cherry picked from commit ee227373ecbbf51ea1956350017e88e3d861acd7)
> https://code.videolan.org/videolan/vlc-android/commit/93ffa30fe0ec375fab5f6c935fd83bf6e173648b
---
libvlc/src/org/videolan/libvlc/util/VLCVideoLayout.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libvlc/src/org/videolan/libvlc/util/VLCVideoLayout.java b/libvlc/src/org/videolan/libvlc/util/VLCVideoLayout.java
index 575f4e164..5fad6429f 100644
--- a/libvlc/src/org/videolan/libvlc/util/VLCVideoLayout.java
+++ b/libvlc/src/org/videolan/libvlc/util/VLCVideoLayout.java
@@ -8,13 +8,13 @@ import android.view.TextureView;
import android.view.ViewGroup;
import android.widget.FrameLayout;
-import org.videolan.R;
-import org.videolan.libvlc.MediaPlayer;
-
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
+import org.videolan.R;
+import org.videolan.libvlc.MediaPlayer;
+
/**
* VLC-ready layout which includes 2 {@link SurfaceView} (video+subtitles) and 1 {@link TextureView}
* All these surfaces are stubs, only the relevant one(s) will be inflated
@@ -50,7 +50,7 @@ public class VLCVideoLayout extends FrameLayout {
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
- setBackgroundColor(getResources().getColor(android.R.color.black));
+ setBackgroundResource(R.color.black);
final ViewGroup.LayoutParams lp = getLayoutParams();
lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
More information about the Android
mailing list