[Android] Fix video player crash on TV

Geoffrey Métais git at videolan.org
Wed Mar 2 18:02:45 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar  2 18:02:02 2016 +0100| [5db38ede68ca456afb1e62930d6bd077597ba3d7] | committer: Geoffrey Métais

Fix video player crash on TV

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

 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 35cc31a..f90df0b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -487,9 +487,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                 lp.setMargins(hm, 0, hm, vm);
                 uiContainer.setLayoutParams(lp);
 
-                lp = (RelativeLayout.LayoutParams) mTitle.getLayoutParams();
-                lp.setMargins(0, vm, 0, 0);
-                mTitle.setLayoutParams(lp);
+                LinearLayout.LayoutParams titleParams = (LinearLayout.LayoutParams) mTitle.getLayoutParams();
+                titleParams.setMargins(0, vm, 0, 0);
+                mTitle.setLayoutParams(titleParams);
             }
         } else
             setRequestedOrientation(getScreenOrientation());



More information about the Android mailing list