[Android] videolist: apply new design

Sébastien Toque git at videolan.org
Thu Sep 5 21:20:04 CEST 2013


vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Thu Sep  5 20:16:54 2013 +0200| [4ee859cafa2d08b758cc920be1c045117b7c456c] | committer: Sébastien Toque

videolist: apply new design

- remove shadow behind thumbnail
- increase progress height
- add a line below
- ask vmem for the same AR as in items' layout
- don't crop blackbars to keep the same AR

This requires thumbnails to be regenerated.

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

 vlc-android/res/drawable/dropshadow.9.png         |  Bin 350 -> 0 bytes
 vlc-android/res/layout/video_grid_item.xml        |    7 +++----
 vlc-android/res/layout/video_list_item.xml        |   13 ++++++++-----
 vlc-android/src/org/videolan/vlc/Thumbnailer.java |    3 +--
 4 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/vlc-android/res/drawable/dropshadow.9.png b/vlc-android/res/drawable/dropshadow.9.png
deleted file mode 100644
index 735a186..0000000
Binary files a/vlc-android/res/drawable/dropshadow.9.png and /dev/null differ
diff --git a/vlc-android/res/layout/video_grid_item.xml b/vlc-android/res/layout/video_grid_item.xml
index f1ae756..dded697 100644
--- a/vlc-android/res/layout/video_grid_item.xml
+++ b/vlc-android/res/layout/video_grid_item.xml
@@ -10,8 +10,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_alignParentTop="true"
-        android:orientation="vertical"
-        android:background="@drawable/dropshadow">
+        android:orientation="vertical">
         <ImageView
             android:id="@+id/ml_item_thumbnail"
             android:layout_width="160dip"
@@ -23,8 +22,8 @@
             android:id="@+id/ml_item_progress"
             android:layout_height="wrap_content"
             android:layout_width="fill_parent"
-            android:minHeight="1dip"
-            android:maxHeight="1dip"
+            android:minHeight="2dip"
+            android:maxHeight="2dip"
             android:progressDrawable="@drawable/gridview_progressbar"
             android:focusable="false"
             android:indeterminate="false" />
diff --git a/vlc-android/res/layout/video_list_item.xml b/vlc-android/res/layout/video_list_item.xml
index d46f65b..d2b8824 100644
--- a/vlc-android/res/layout/video_list_item.xml
+++ b/vlc-android/res/layout/video_list_item.xml
@@ -11,8 +11,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_alignParentLeft="true"
-        android:orientation="vertical"
-        android:background="@drawable/dropshadow">
+        android:orientation="vertical">
         <ImageView
             android:id="@+id/ml_item_thumbnail"
             android:layout_width="120dip"
@@ -23,8 +22,8 @@
             android:id="@+id/ml_item_progress"
             android:layout_height="wrap_content"
             android:layout_width="fill_parent"
-            android:minHeight="1dip"
-            android:maxHeight="1dip"
+            android:minHeight="2dip"
+            android:maxHeight="2dip"
             android:progressDrawable="@drawable/gridview_progressbar"
             android:focusable="false"
             android:indeterminate="false" />
@@ -56,9 +55,13 @@
         android:id="@+id/ml_item_more"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:paddingBottom="8dip"
         android:src="@drawable/dropdown_ic_arrow"
         android:layout_alignParentBottom="true"
         android:layout_alignParentRight="true"
         android:clickable="true" />
+    <View
+        android:layout_width="wrap_content"
+        android:layout_height="1dp"
+        android:layout_below="@+id/ml_item_layout_thumbnail"
+        android:background="?attr/background_menu_divider" />
 </RelativeLayout>
\ No newline at end of file
diff --git a/vlc-android/src/org/videolan/vlc/Thumbnailer.java b/vlc-android/src/org/videolan/vlc/Thumbnailer.java
index 0eca027..d2a43d8 100644
--- a/vlc-android/src/org/videolan/vlc/Thumbnailer.java
+++ b/vlc-android/src/org/videolan/vlc/Thumbnailer.java
@@ -156,7 +156,7 @@ public class Thumbnailer implements Runnable {
             count++;
 
             int width = (int) (120 * mDensity);
-            int height = (int) (80 * mDensity);
+            int height = (int) (75 * mDensity);
 
             // Get the thumbnail.
             Bitmap thumbnail = Bitmap.createBitmap(width, height, Config.ARGB_8888);
@@ -169,7 +169,6 @@ public class Thumbnailer implements Runnable {
             }
 
             thumbnail.copyPixelsFromBuffer(ByteBuffer.wrap(b));
-            thumbnail = Util.cropBorders(thumbnail, width, height);
 
             Log.i(TAG, "Thumbnail created for " + item.getFileName());
 



More information about the Android mailing list