Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
4a9d0d9a
Commit
4a9d0d9a
authored
May 05, 2012
by
Sébastien Toque
Browse files
UI: Increase thumbnail size
parent
19fadacc
Changes
2
Hide whitespace changes
Inline
Side-by-side
vlc-android/res/layout/video_list_item.xml
View file @
4a9d0d9a
...
...
@@ -6,8 +6,8 @@
android:orientation=
"horizontal"
android:gravity=
"center_vertical"
>
<FrameLayout
android:layout_width=
"
9
0dip"
android:layout_height=
"
7
0dip"
>
android:layout_width=
"
12
0dip"
android:layout_height=
"
8
0dip"
>
<ImageView
android:id=
"@+id/ml_item_thumbnail"
android:layout_width=
"fill_parent"
...
...
vlc-android/src/org/videolan/vlc/ThumbnailerManager.java
View file @
4a9d0d9a
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment