[Android] UI : Modify mini-player shadow and remove unused code

Alexandre Perraud git at videolan.org
Tue Apr 7 16:06:47 CEST 2015


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Tue Apr  7 16:05:02 2015 +0200| [c5856d24b61a6df60363d8bbc59ea4e67fdba8d1] | committer: Alexandre Perraud

UI : Modify mini-player shadow and remove unused code

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

 vlc-android/res/drawable/audio_playlist_shadow.xml     |   13 -------------
 vlc-android/res/drawable/mini_player_top_shadow.xml    |   13 -------------
 vlc-android/res/drawable/progress_mini_player.xml      |    2 +-
 vlc-android/res/values/attrs.xml                       |    2 --
 vlc-android/res/values/styles.xml                      |    6 ------
 vlc-android/src/org/videolan/vlc/gui/MainActivity.java |    2 +-
 6 files changed, 2 insertions(+), 36 deletions(-)

diff --git a/vlc-android/res/drawable/audio_playlist_shadow.xml b/vlc-android/res/drawable/audio_playlist_shadow.xml
deleted file mode 100644
index 266f826..0000000
--- a/vlc-android/res/drawable/audio_playlist_shadow.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android" >
-
-    <gradient
-        android:angle="90"
-        android:endColor="#00000000"
-        android:startColor="#ffa0a0a0" />
-
-    <size
-        android:height="5dp"
-        android:width="30dp" />
-
-</shape>
\ No newline at end of file
diff --git a/vlc-android/res/drawable/mini_player_top_shadow.xml b/vlc-android/res/drawable/mini_player_top_shadow.xml
deleted file mode 100644
index 80a3d85..0000000
--- a/vlc-android/res/drawable/mini_player_top_shadow.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android" >
-
-    <gradient
-        android:angle="90"
-        android:endColor="#00000000"
-        android:startColor="#ffc0c0c0" />
-
-    <size
-        android:height="5dp"
-        android:width="30dp" />
-
-</shape>
\ No newline at end of file
diff --git a/vlc-android/res/drawable/progress_mini_player.xml b/vlc-android/res/drawable/progress_mini_player.xml
index b39c358..192af1a 100644
--- a/vlc-android/res/drawable/progress_mini_player.xml
+++ b/vlc-android/res/drawable/progress_mini_player.xml
@@ -2,7 +2,7 @@
 
     <item android:id="@android:id/background">
         <shape>
-            <solid android:color="#00000000" />
+            <solid android:color="?attr/background_default" />
         </shape>
     </item>
     <item android:id="@android:id/progress">
diff --git a/vlc-android/res/values/attrs.xml b/vlc-android/res/values/attrs.xml
index 889e83c..4d7a0f0 100644
--- a/vlc-android/res/values/attrs.xml
+++ b/vlc-android/res/values/attrs.xml
@@ -61,8 +61,6 @@
     <attr name="gridview_progressbar" format="reference" />
     <attr name="toolbar_popup_style" format="reference" />
 
-    <attr name="mini_player_top_shadow" format="reference" />
-    <attr name="audio_playlist_shadow" format="reference" />
     <attr name="shadow_top_9patch" format="reference"/>
     <attr name="shadow_bottom_9patch" format="reference"/>
 
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index 532d6c4..c5795cb 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -40,9 +40,6 @@
         <item name="list_title">@color/list_title</item>
         <item name="android:windowBackground">@color/grey200</item>
 
-        <item name="mini_player_top_shadow">@drawable/mini_player_top_shadow</item>
-        <item name="audio_playlist_shadow">@drawable/audio_playlist_shadow</item>
-
         <item name="ic_playlist_normal">@drawable/ic_playlist_normal</item>
         <item name="ic_playlist_pressed">@drawable/ic_playlist_pressed</item>
         <item name="ic_repeat_normal">@drawable/ic_repeat_normal</item>
@@ -113,9 +110,6 @@
         <item name="list_title">@color/bt_list_title</item>
         <item name="android:windowBackground">@color/grey900</item>
 
-        <item name="mini_player_top_shadow">@null</item>
-        <item name="audio_playlist_shadow">@null</item>
-
         <item name="ic_playlist_normal">@drawable/ic_playlist_normal_w</item>
         <item name="ic_playlist_pressed">@drawable/ic_playlist_pressed</item>
         <item name="ic_repeat_normal">@drawable/ic_repeat_normal_w</item>
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 50106ab..f24af92 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -873,7 +873,7 @@ public class MainActivity extends ActionBarActivity implements OnItemClickListen
 
             @Override
             public void onPanelOpened() {
-                int resId = Util.getResourceFromAttribute(MainActivity.this, R.attr.mini_player_top_shadow);
+                int resId = Util.getResourceFromAttribute(MainActivity.this, R.attr.shadow_bottom_9patch);
                 if (resId != 0)
                     mSlidingPane.setShadowResource(resId);
                 mAudioPlayer.setHeaderVisibilities(false, false, true, true, true, false);



More information about the Android mailing list