[Android] UI : Fix dark theme for MRL view

Alexandre Perraud git at videolan.org
Thu Mar 5 13:32:11 CET 2015


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Thu Mar  5 13:31:29 2015 +0100| [d87272f5a771481b3972691082d584e3edbb0e8e] | committer: Alexandre Perraud

UI : Fix dark theme for MRL view

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

 assets/images/svg/ic_trash_small_normal_w.svg      |   64 ++++++++++++++++++++
 .../res/drawable-hdpi/ic_trash_small_normal_w.png  |  Bin 0 -> 281 bytes
 .../res/drawable-ldpi/ic_trash_small_normal_w.png  |  Bin 0 -> 224 bytes
 .../res/drawable-mdpi/ic_trash_small_normal_w.png  |  Bin 0 -> 215 bytes
 .../res/drawable-xhdpi/ic_trash_small_normal_w.png |  Bin 0 -> 292 bytes
 vlc-android/res/layout/mrl_item.xml                |   14 +++--
 vlc-android/res/values/attrs.xml                   |    1 +
 vlc-android/res/values/styles.xml                  |    2 +
 8 files changed, 75 insertions(+), 6 deletions(-)

diff --git a/assets/images/svg/ic_trash_small_normal_w.svg b/assets/images/svg/ic_trash_small_normal_w.svg
new file mode 100644
index 0000000..8680678
--- /dev/null
+++ b/assets/images/svg/ic_trash_small_normal_w.svg
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="12"
+   height="12"
+   id="svg4682"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   sodipodi:docname="ic_trash_small_normal_w.svg"
+   inkscape:export-filename="/home/corbax/Dev/android/Icons/Test 1/ic_play_normal.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4684" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.4"
+     inkscape:cx="-16.466312"
+     inkscape:cy="10.717892"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1056"
+     inkscape:window-x="0"
+     inkscape:window-y="24"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata4687">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1040.3622)">
+    <path
+       style="color:#000000;fill:#fafafa;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m 5,1041.8622 c -0.3698,0 -0.686355,0.2016 -0.859375,0.5 l -1.640625,0 0,1 7,0 0,-1 -1.640625,0 c -0.17302,-0.2984 -0.489575,-0.5 -0.859375,-0.5 l -2,0 z m -2,2 0,6 c 0,0.554 0.446,1 1,1 l 4,0 c 0.554,0 1,-0.446 1,-1 l 0,-6 -6,0 z"
+       id="rect6956"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
diff --git a/vlc-android/res/drawable-hdpi/ic_trash_small_normal_w.png b/vlc-android/res/drawable-hdpi/ic_trash_small_normal_w.png
new file mode 100644
index 0000000..54b1247
Binary files /dev/null and b/vlc-android/res/drawable-hdpi/ic_trash_small_normal_w.png differ
diff --git a/vlc-android/res/drawable-ldpi/ic_trash_small_normal_w.png b/vlc-android/res/drawable-ldpi/ic_trash_small_normal_w.png
new file mode 100644
index 0000000..d9382d7
Binary files /dev/null and b/vlc-android/res/drawable-ldpi/ic_trash_small_normal_w.png differ
diff --git a/vlc-android/res/drawable-mdpi/ic_trash_small_normal_w.png b/vlc-android/res/drawable-mdpi/ic_trash_small_normal_w.png
new file mode 100644
index 0000000..433a403
Binary files /dev/null and b/vlc-android/res/drawable-mdpi/ic_trash_small_normal_w.png differ
diff --git a/vlc-android/res/drawable-xhdpi/ic_trash_small_normal_w.png b/vlc-android/res/drawable-xhdpi/ic_trash_small_normal_w.png
new file mode 100644
index 0000000..afa46e5
Binary files /dev/null and b/vlc-android/res/drawable-xhdpi/ic_trash_small_normal_w.png differ
diff --git a/vlc-android/res/layout/mrl_item.xml b/vlc-android/res/layout/mrl_item.xml
index fd1c63c..392a5ff 100644
--- a/vlc-android/res/layout/mrl_item.xml
+++ b/vlc-android/res/layout/mrl_item.xml
@@ -8,24 +8,26 @@
 
     <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
+        android:layout_height="wrap_content"
+        android:background="?attr/background_default">
         <TextView
             android:id="@+id/mrl_item_uri"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
+            android:layout_toLeftOf="@+id/mrl_item_delete"
+            android:clickable="true"
+            android:ellipsize="middle"
+            android:gravity="center_vertical"
             android:paddingLeft="10dp"
             android:singleLine="true"
-            android:ellipsize="middle"
-            android:clickable="true"
-            android:layout_toLeftOf="@+id/mrl_item_delete"
-            android:gravity="center_vertical"/>
+            android:textColor="?attr/font_default" />
         <ImageView
             android:id="@+id/mrl_item_delete"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
             android:layout_centerInParent="true"
-            android:src="@drawable/ic_trash_small_normal"
+            android:src="?attr/ic_trash_small_normal"
             android:clickable="true"
             android:paddingRight="5dp"/>
     </RelativeLayout>
diff --git a/vlc-android/res/values/attrs.xml b/vlc-android/res/values/attrs.xml
index fa3a519..86d6310 100644
--- a/vlc-android/res/values/attrs.xml
+++ b/vlc-android/res/values/attrs.xml
@@ -59,6 +59,7 @@
     <attr name="ic_menu_preferences" format="reference" />
     <attr name="ic_menu_cone" format="reference" />
     <attr name="ic_move_media" format="reference" />
+    <attr name="ic_trash_small_normal" format="reference" />
     <attr name="gridview_progressbar" format="reference" />
 
     <attr name="mini_player_top_shadow" format="reference" />
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index 8169eaf..62f47ea 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -78,6 +78,7 @@
         <item name="ic_menu_preferences">@drawable/ic_menu_preferences</item>
         <item name="ic_menu_cone">@drawable/ic_menu_cone</item>
         <item name="ic_move_media">@drawable/ic_move_media</item>
+        <item name="ic_trash_small_normal">@drawable/ic_trash_small_normal</item>
         <item name="gridview_progressbar">@drawable/gridview_progressbar_w</item>
         <item name="advanced_options_style">@style/Theme.VLC.AdvancedOptionsLight</item>
     </style>
@@ -152,6 +153,7 @@
         <item name="ic_menu_preferences">@drawable/ic_menu_preferences_w</item>
         <item name="ic_menu_cone">@drawable/ic_menu_cone_w</item>
         <item name="ic_move_media">@drawable/ic_move_media_w</item>
+        <item name="ic_trash_small_normal">@drawable/ic_trash_small_normal_w</item>
         <item name="gridview_progressbar">@drawable/gridview_progressbar</item>
         <item name="advanced_options_style">@style/Theme.VLC.AdvancedOptionsBlack</item>
     </style>



More information about the Android mailing list