[Android] Adjust thumbnails in video browser
Geoffrey Métais
git at videolan.org
Fri Dec 19 13:36:46 CET 2014
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Dec 16 17:16:58 2014 +0100| [ab6178775a1ed738aa3e1edd7918169aa7de6dcd] | committer: Jean-Baptiste Kempf
Adjust thumbnails in video browser
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=ab6178775a1ed738aa3e1edd7918169aa7de6dcd
---
vlc-android/res/layout/video_grid_card.xml | 3 ++-
vlc-android/res/layout/video_list_card.xml | 3 ++-
vlc-android/res/values-sw600dp/dimens.xml | 2 +-
vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java | 2 --
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/vlc-android/res/layout/video_grid_card.xml b/vlc-android/res/layout/video_grid_card.xml
index ea21ab0..fc8cb68 100644
--- a/vlc-android/res/layout/video_grid_card.xml
+++ b/vlc-android/res/layout/video_grid_card.xml
@@ -19,7 +19,8 @@
android:layout_width="match_parent"
android:layout_height="@dimen/grid_card_thumb_height"
android:layout_alignParentTop="true"
- android:scaleType="fitXY" />
+ android:background="@color/grey300"
+ android:scaleType="fitCenter" />
<TextView
android:id="@+id/ml_item_title"
diff --git a/vlc-android/res/layout/video_list_card.xml b/vlc-android/res/layout/video_list_card.xml
index 2286a1e..c058d47 100644
--- a/vlc-android/res/layout/video_list_card.xml
+++ b/vlc-android/res/layout/video_list_card.xml
@@ -18,7 +18,8 @@
android:layout_width="120dip"
android:layout_height="75dip"
android:layout_alignParentLeft="true"
- android:scaleType="fitCenter" />
+ android:scaleType="fitCenter"
+ android:background="@color/grey300" />
<TextView
android:id="@+id/ml_item_title"
diff --git a/vlc-android/res/values-sw600dp/dimens.xml b/vlc-android/res/values-sw600dp/dimens.xml
index 7426f80..981cc97 100644
--- a/vlc-android/res/values-sw600dp/dimens.xml
+++ b/vlc-android/res/values-sw600dp/dimens.xml
@@ -1,7 +1,7 @@
<resources>
<dimen name="grid_card_width">200dp</dimen>
<dimen name="grid_card_height">200dp</dimen>
- <dimen name="grid_card_thumb_height">120dp</dimen>
+ <dimen name="grid_card_thumb_height">125dp</dimen>
<dimen name="grid_card_title_text_size">16sp</dimen>
<dimen name="grid_card_subtitle_text_size">12sp</dimen>
<dimen name="grid_card_vertical_spacing">10dp</dimen>
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
index f34c3bb..269f2e5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
@@ -176,12 +176,10 @@ public class VideoListAdapter extends ArrayAdapter<Media>
if (thumbnail == null) {
// missing thumbnail
thumbnail = BitmapCache.GetFromResource(v, R.drawable.ic_cone_o);
- holder.thumbnail.setScaleType(ImageView.ScaleType.FIT_CENTER);
}
else if (thumbnail.getWidth() == 1 && thumbnail.getHeight() == 1) {
// dummy thumbnail
thumbnail = BitmapCache.GetFromResource(v, R.drawable.ic_cone_o);
- holder.thumbnail.setScaleType(ImageView.ScaleType.FIT_CENTER);
}
//FIXME Warning: the thumbnails are upscaled in the grid view!
holder.thumbnail.setImageBitmap(thumbnail);
More information about the Android
mailing list