[Android] Fix alpha for player HUD

Geoffrey Métais git at videolan.org
Tue Dec 16 16:23:56 CET 2014


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Dec 15 18:55:44 2014 +0100| [90988f3929f249225779721c710f9ff7623055ab] | committer: Geoffrey Métais

Fix alpha for player HUD

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=90988f3929f249225779721c710f9ff7623055ab
---

 vlc-android/res/drawable/rounded_corners.xml                      |    2 +-
 vlc-android/res/layout/player_hud.xml                             |    1 -
 vlc-android/res/values/colors.xml                                 |    1 +
 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java       |    5 -----
 4 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/vlc-android/res/drawable/rounded_corners.xml b/vlc-android/res/drawable/rounded_corners.xml
index b7e66a1..01a0083 100644
--- a/vlc-android/res/drawable/rounded_corners.xml
+++ b/vlc-android/res/drawable/rounded_corners.xml
@@ -3,7 +3,7 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:shape="rectangle">
     <solid
-        android:color="@android:color/black" >
+        android:color="@color/blacktransparent" >
     </solid>
     <corners
         android:radius="3dp"   >
diff --git a/vlc-android/res/layout/player_hud.xml b/vlc-android/res/layout/player_hud.xml
index 457bb55..980c529 100644
--- a/vlc-android/res/layout/player_hud.xml
+++ b/vlc-android/res/layout/player_hud.xml
@@ -5,7 +5,6 @@
     android:layout_height="wrap_content"
     android:layout_centerInParent="@bool/center_hud"
     android:layout_alignParentBottom="true"
-    android:alpha="0.55"
     android:background="@drawable/rounded_corners"
     android:paddingTop="@dimen/overlay_padding_top"
     android:paddingBottom="@dimen/overlay_padding_bottom"
diff --git a/vlc-android/res/values/colors.xml b/vlc-android/res/values/colors.xml
index e5a5a8a..8847bf2 100644
--- a/vlc-android/res/values/colors.xml
+++ b/vlc-android/res/values/colors.xml
@@ -25,6 +25,7 @@
     <color name="black1">#0f0f0f</color>
     <color name="black2">#222222</color>
     <color name="black3">#181818</color>
+    <color name="blacktransparent">#8C000000</color>
 
     <color name="grey1">#393939</color>
     <color name="grey2">#d0d0d0</color>
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 9dbccf7..337d261 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -325,11 +325,6 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
         mSysTime = (TextView) findViewById(R.id.player_overlay_systime);
         mBattery = (TextView) findViewById(R.id.player_overlay_battery);
         mOverlayProgress = findViewById(R.id.progress_overlay);
-        //Manually set opacity, because aplha tag is SDK 11+
-        if (!LibVlcUtil.isHoneycombOrLater()){
-            Drawable background = mOverlayProgress.getBackground();
-            background.setAlpha(140); //255 is max (visible)
-        }
         mOverlayBackground = findViewById(R.id.player_overlay_background);
 
         // Position and remaining time



More information about the Android mailing list