Commit 4a9d0d9a authored by Sébastien Toque's avatar Sébastien Toque

UI: Increase thumbnail size

parent 19fadacc
......@@ -6,8 +6,8 @@
android:orientation="horizontal"
android:gravity="center_vertical">
<FrameLayout
android:layout_width="90dip"
android:layout_height="70dip">
android:layout_width="120dip"
android:layout_height="80dip">
<ImageView
android:id="@+id/ml_item_thumbnail"
android:layout_width="fill_parent"
......
......@@ -33,6 +33,7 @@ import org.videolan.vlc.gui.video.VideoListActivity;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.util.DisplayMetrics;
import android.util.Log;
public class ThumbnailerManager extends Thread {
......@@ -46,6 +47,7 @@ public class ThumbnailerManager extends Thread {
private LibVLC mLibVlc;
private VideoListActivity mVideoListActivity;
private int totalCount;
private float mDensity;
public ThumbnailerManager(VideoListActivity videoListActivity) {
mVideoListActivity = videoListActivity;
......@@ -54,6 +56,10 @@ public class ThumbnailerManager extends Thread {
} catch (LibVlcException e) {
e.printStackTrace();
}
DisplayMetrics metrics = new DisplayMetrics();
mVideoListActivity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
mDensity = metrics.density;
start();
}
......@@ -116,8 +122,8 @@ public class ThumbnailerManager extends Thread {
MainActivity.sendTextInfo(mVideoListActivity, String.format("%s %s", prefix, item.getFileName()), count, total);
count++;
int width = 120;
int height = 120;
int width = (int) (120 * mDensity);
int height = (int) (120 * mDensity);
// Get the thumbnail.
Bitmap thumbnail = Bitmap.createBitmap(width, height, Config.ARGB_8888);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment