[Android] Add seen icon for video

Alexandre Perraud git at videolan.org
Fri Jul 7 17:05:50 CEST 2017


vlc-android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Wed Jul  5 15:12:58 2017 +0200| [0b269320cec5ae24ab33604442463b85c3e6ba69] | committer: Alexandre Perraud

Add seen icon for video

> https://code.videolan.org/videolan/vlc-android/commit/0b269320cec5ae24ab33604442463b85c3e6ba69
---

 assets/images/svg/ic_seen_normal.svg              |  78 ++++++++++++++++++++++
 vlc-android/res/drawable-hdpi/ic_seen_normal.png  | Bin 0 -> 357 bytes
 vlc-android/res/drawable-ldpi/ic_seen_normal.png  | Bin 0 -> 244 bytes
 vlc-android/res/drawable-mdpi/ic_seen_normal.png  | Bin 0 -> 283 bytes
 vlc-android/res/drawable-xhdpi/ic_seen_normal.png | Bin 0 -> 398 bytes
 vlc-android/res/layout/video_grid_card.xml        |  31 +++++++--
 vlc-android/res/layout/video_list_card.xml        |  10 +++
 7 files changed, 112 insertions(+), 7 deletions(-)

diff --git a/assets/images/svg/ic_seen_normal.svg b/assets/images/svg/ic_seen_normal.svg
new file mode 100644
index 000000000..c7cba86a9
--- /dev/null
+++ b/assets/images/svg/ic_seen_normal.svg
@@ -0,0 +1,78 @@
+<?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="8"
+   height="8"
+   id="svg4682"
+   version="1.1"
+   inkscape:version="0.92.1 r15371"
+   sodipodi:docname="ic_seen_normal.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="31.678385"
+     inkscape:cx="1.0205697"
+     inkscape:cy="10.938903"
+     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,-1044.3622)">
+    <path
+       style="fill:#ff8800;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
+       d="m 8,1052.3622 -8,-8 h 8 z"
+       id="path4493"
+       inkscape:connector-curvature="0" />
+    <path
+       sodipodi:nodetypes="ccccccc"
+       inkscape:connector-curvature="0"
+       style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#fafafa;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.25;marker:none;enable-background:accumulate"
+       d="m 6.7632455,1045.599 0.530405,0.5304 -2,2 -1.2790178,-1.279 0.53632,-0.5246 0.7427728,0.7427 z"
+       id="path8724" />
+  </g>
+</svg>
diff --git a/vlc-android/res/drawable-hdpi/ic_seen_normal.png b/vlc-android/res/drawable-hdpi/ic_seen_normal.png
new file mode 100644
index 000000000..b3899b340
Binary files /dev/null and b/vlc-android/res/drawable-hdpi/ic_seen_normal.png differ
diff --git a/vlc-android/res/drawable-ldpi/ic_seen_normal.png b/vlc-android/res/drawable-ldpi/ic_seen_normal.png
new file mode 100644
index 000000000..e76e8b3ba
Binary files /dev/null and b/vlc-android/res/drawable-ldpi/ic_seen_normal.png differ
diff --git a/vlc-android/res/drawable-mdpi/ic_seen_normal.png b/vlc-android/res/drawable-mdpi/ic_seen_normal.png
new file mode 100644
index 000000000..3d388144f
Binary files /dev/null and b/vlc-android/res/drawable-mdpi/ic_seen_normal.png differ
diff --git a/vlc-android/res/drawable-xhdpi/ic_seen_normal.png b/vlc-android/res/drawable-xhdpi/ic_seen_normal.png
new file mode 100644
index 000000000..616114a3e
Binary files /dev/null and b/vlc-android/res/drawable-xhdpi/ic_seen_normal.png differ
diff --git a/vlc-android/res/layout/video_grid_card.xml b/vlc-android/res/layout/video_grid_card.xml
index a5ad24054..a8db395f6 100644
--- a/vlc-android/res/layout/video_grid_card.xml
+++ b/vlc-android/res/layout/video_grid_card.xml
@@ -53,15 +53,29 @@
         android:paddingRight="@dimen/left_right_1610_margin"
         android:paddingBottom="@dimen/top_bottom_1610_margin"
         android:paddingTop="@dimen/top_bottom_1610_margin" >
+
         <!-- Image loading is handled by org.videolan.vlc.gui.helpers.AsyncImageLoader.loadPicture() -->
         <ImageView
             android:id="@+id/ml_item_thumbnail"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
             android:background="@{cover}"
             android:scaleType="fitXY"
             android:src="@drawable/black_gradient"
-            vlc:media="@{media}" />
+            vlc:media="@{media}"
+            vlc:layout_constraintTop_toTopOf="parent"
+            vlc:layout_constraintBottom_toBottomOf="parent"
+            vlc:layout_constraintStart_toStartOf="parent"
+            vlc:layout_constraintEnd_toEndOf="parent"/>
+
+        <ImageView
+            android:id="@+id/ml_item_seen"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@drawable/ic_seen_normal"
+            android:visibility="gone"
+            vlc:layout_constraintEnd_toEndOf="@+id/ml_item_thumbnail"
+            vlc:layout_constraintTop_toTopOf="@+id/ml_item_thumbnail" />
 
         <TextView
             android:id="@+id/ml_item_title"
@@ -127,19 +141,22 @@
         <ProgressBar
             android:id="@+id/ml_item_progress"
             style="@style/Widget.AppCompat.ProgressBar.Horizontal"
-            android:layout_width="match_parent"
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
             vlc:layout_constraintBottom_toBottomOf="parent"
+            vlc:layout_constraintLeft_toLeftOf="parent"
+            vlc:layout_constraintRight_toRightOf="parent"
             android:layout_marginBottom="2dp"
-            android:layout_marginLeft="@dimen/very_small_margin"
-            android:layout_marginRight="@dimen/very_small_margin"
-            android:layout_marginTop="1dp"
             android:background="@color/transparent"
             android:focusable="false"
             android:indeterminate="false"
             android:max="@{max}"
             android:maxHeight="2dip"
             android:minHeight="2dip"
+            android:paddingLeft="@dimen/half_default_margin"
+            android:paddingStart="@dimen/half_default_margin"
+            android:paddingRight="@dimen/half_default_margin"
+            android:paddingEnd="@dimen/half_default_margin"
             android:progress="@{progress}"
             android:progressDrawable="@drawable/gridview_progressbar"
             android:secondaryProgress="0"
diff --git a/vlc-android/res/layout/video_list_card.xml b/vlc-android/res/layout/video_list_card.xml
index 96c548140..a3e2b9cee 100644
--- a/vlc-android/res/layout/video_list_card.xml
+++ b/vlc-android/res/layout/video_list_card.xml
@@ -63,6 +63,16 @@
             vlc:media="@{media}"
             android:scaleType="fitXY"
             android:background="@{cover}" />
+
+        <ImageView
+            android:id="@+id/ml_item_seen"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@drawable/ic_seen_normal"
+            android:visibility="gone"
+            vlc:layout_constraintEnd_toEndOf="@+id/ml_item_thumbnail"
+            vlc:layout_constraintTop_toTopOf="@+id/ml_item_thumbnail" />
+
         <TextView
             android:id="@+id/ml_item_title"
             android:layout_width="0dp"



More information about the Android mailing list