[Android] Add xml behaviors for checkbox icons

Alexandre Perraud git at videolan.org
Tue Jun 20 17:41:07 CEST 2017


vlc-android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Tue Jun 20 17:39:11 2017 +0200| [0439d0cdca47a8b12d4c6d9369bdbdbc26c00b02] | committer: Alexandre Perraud

Add xml behaviors for checkbox icons

> https://code.videolan.org/videolan/vlc-android/commit/0439d0cdca47a8b12d4c6d9369bdbdbc26c00b02
---

 assets/images/svg/ic_checkbox_partialy_pressed.svg |  79 +++++++++++++++++++++
 .../drawable-hdpi/ic_checkbox_partialy_pressed.png | Bin 0 -> 294 bytes
 .../drawable-ldpi/ic_checkbox_partialy_pressed.png | Bin 0 -> 260 bytes
 .../drawable-mdpi/ic_checkbox_partialy_pressed.png | Bin 0 -> 232 bytes
 .../ic_checkbox_partialy_pressed.png               | Bin 0 -> 345 bytes
 vlc-android/res/drawable/ic_checkbox_false.xml     |   8 +++
 vlc-android/res/drawable/ic_checkbox_partialy.xml  |   7 ++
 vlc-android/res/drawable/ic_checkbox_true.xml      |   8 +++
 8 files changed, 102 insertions(+)

diff --git a/assets/images/svg/ic_checkbox_partialy_pressed.svg b/assets/images/svg/ic_checkbox_partialy_pressed.svg
new file mode 100644
index 000000000..a7186ab2b
--- /dev/null
+++ b/assets/images/svg/ic_checkbox_partialy_pressed.svg
@@ -0,0 +1,79 @@
+<?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="20"
+   height="20"
+   id="svg4682"
+   version="1.1"
+   inkscape:version="0.92.1 r15371"
+   sodipodi:docname="ic_checkbox_partialy_pressed.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="-3.588927"
+     inkscape:cy="4.3335279"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1027"
+     inkscape:window-x="0"
+     inkscape:window-y="27"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3846"
+       empspacing="4"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <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,-1032.3622)">
+    <path
+       style="color:#000000;fill:#ffb54c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m 6,1037.3622 c -0.554,0 -1,0.446 -1,1 l 0,8 c 0,0.554 0.446,1 1,1 l 8,0 c 0.554,0 1,-0.446 1,-1 l 0,-8 c 0,-0.554 -0.446,-1 -1,-1 l -8,0 z m 0,1 8,0 0,8 -8,0 0,-8 z"
+       id="rect4929"
+       inkscape:connector-curvature="0" />
+    <rect
+       style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffb54c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.19999981;stroke-opacity:1;marker:none;enable-background:accumulate"
+       id="rect4154"
+       width="6"
+       height="6"
+       x="7"
+       y="1039.3622" />
+  </g>
+</svg>
diff --git a/vlc-android/res/drawable-hdpi/ic_checkbox_partialy_pressed.png b/vlc-android/res/drawable-hdpi/ic_checkbox_partialy_pressed.png
new file mode 100644
index 000000000..3134c70ff
Binary files /dev/null and b/vlc-android/res/drawable-hdpi/ic_checkbox_partialy_pressed.png differ
diff --git a/vlc-android/res/drawable-ldpi/ic_checkbox_partialy_pressed.png b/vlc-android/res/drawable-ldpi/ic_checkbox_partialy_pressed.png
new file mode 100644
index 000000000..4d201f18c
Binary files /dev/null and b/vlc-android/res/drawable-ldpi/ic_checkbox_partialy_pressed.png differ
diff --git a/vlc-android/res/drawable-mdpi/ic_checkbox_partialy_pressed.png b/vlc-android/res/drawable-mdpi/ic_checkbox_partialy_pressed.png
new file mode 100644
index 000000000..afd4098e6
Binary files /dev/null and b/vlc-android/res/drawable-mdpi/ic_checkbox_partialy_pressed.png differ
diff --git a/vlc-android/res/drawable-xhdpi/ic_checkbox_partialy_pressed.png b/vlc-android/res/drawable-xhdpi/ic_checkbox_partialy_pressed.png
new file mode 100644
index 000000000..701f3d146
Binary files /dev/null and b/vlc-android/res/drawable-xhdpi/ic_checkbox_partialy_pressed.png differ
diff --git a/vlc-android/res/drawable/ic_checkbox_false.xml b/vlc-android/res/drawable/ic_checkbox_false.xml
new file mode 100644
index 000000000..d85cfe8aa
--- /dev/null
+++ b/vlc-android/res/drawable/ic_checkbox_false.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/ic_checkbox_false" android:state_focused="true" android:state_pressed="true"/>
+    <item android:drawable="@drawable/ic_checkbox_false_pressed" android:state_focused="true"/>
+    <item android:drawable="@drawable/ic_checkbox_false_pressed" android:state_pressed="true"/>
+    <item android:drawable="@drawable/ic_checkbox_false_pressed" android:state_enabled="false"/>
+    <item android:drawable="@drawable/ic_checkbox_false"/>
+</selector>
\ No newline at end of file
diff --git a/vlc-android/res/drawable/ic_checkbox_partialy.xml b/vlc-android/res/drawable/ic_checkbox_partialy.xml
new file mode 100644
index 000000000..3550490ff
--- /dev/null
+++ b/vlc-android/res/drawable/ic_checkbox_partialy.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/ic_checkbox_partialy" android:state_focused="true" android:state_pressed="true"/>
+    <item android:drawable="@drawable/ic_checkbox_partialy_pressed" android:state_focused="true"/>
+    <item android:drawable="@drawable/ic_checkbox_partialy_pressed" android:state_pressed="true"/>
+    <item android:drawable="@drawable/ic_checkbox_partialy"/>
+</selector>
\ No newline at end of file
diff --git a/vlc-android/res/drawable/ic_checkbox_true.xml b/vlc-android/res/drawable/ic_checkbox_true.xml
new file mode 100644
index 000000000..5d3367182
--- /dev/null
+++ b/vlc-android/res/drawable/ic_checkbox_true.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/ic_checkbox_true" android:state_focused="true" android:state_pressed="true"/>
+    <item android:drawable="@drawable/ic_checkbox_true_pressed" android:state_focused="true"/>
+    <item android:drawable="@drawable/ic_checkbox_true_pressed" android:state_pressed="true"/>
+    <item android:drawable="@drawable/ic_checkbox_true_pressed" android:state_enabled="false"/>
+    <item android:drawable="@drawable/ic_checkbox_true"/>
+</selector>
\ No newline at end of file



More information about the Android mailing list