Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Casanowow Life for love
VLC-Android
Commits
1e0bc687
Commit
1e0bc687
authored
Oct 06, 2012
by
Ludovic Fauvet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redesign of the video list/grid
parent
d37c8ec0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
17 deletions
+30
-17
vlc-android/assets/licence.htm
vlc-android/assets/licence.htm
+4
-0
vlc-android/res/drawable/background_pattern_dark.png
vlc-android/res/drawable/background_pattern_dark.png
+0
-0
vlc-android/res/drawable/background_pattern_dark_repeat.xml
vlc-android/res/drawable/background_pattern_dark_repeat.xml
+4
-0
vlc-android/res/layout/video_grid.xml
vlc-android/res/layout/video_grid.xml
+6
-1
vlc-android/res/layout/video_grid_item.xml
vlc-android/res/layout/video_grid_item.xml
+9
-9
vlc-android/res/layout/video_list_item.xml
vlc-android/res/layout/video_list_item.xml
+3
-3
vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
...oid/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+2
-2
vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
...roid/src/org/videolan/vlc/gui/video/VideoListAdapter.java
+2
-2
No files found.
vlc-android/assets/licence.htm
View file @
1e0bc687
...
@@ -54,6 +54,10 @@
...
@@ -54,6 +54,10 @@
<li>
Zlib - Copyright
©
1995-2012 Jean-loup Gailly and Mark Adler -
<a
href=
"http://zlib.net/zlib_license.html"
>
zlib licence
</a></li>
<li>
Zlib - Copyright
©
1995-2012 Jean-loup Gailly and Mark Adler -
<a
href=
"http://zlib.net/zlib_license.html"
>
zlib licence
</a></li>
</ul>
</ul>
</p>
</p>
<h2>
Graphics
</h2>
<ul>
<li>
Background pattern - Copyright
©
2012 Jordan Pittman -
<a
href=
"http://creativecommons.org/licenses/by-sa/3.0/"
>
Creative Commons BY-SA 3.0
</a></li>
</ul>
</div>
</div>
<p><a
href=
"#top"
>
Back to the top
</a></p>
<p><a
href=
"#top"
>
Back to the top
</a></p>
<hr
/>
<hr
/>
...
...
vlc-android/res/drawable/background_pattern_dark.png
0 → 100644
View file @
1e0bc687
22.2 KB
vlc-android/res/drawable/background_pattern_dark_repeat.xml
0 → 100644
View file @
1e0bc687
<?xml version="1.0" encoding="utf-8"?>
<bitmap
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:src=
"@drawable/background_pattern_dark"
android:tileMode=
"repeat"
/>
\ No newline at end of file
vlc-android/res/layout/video_grid.xml
View file @
1e0bc687
...
@@ -8,11 +8,16 @@
...
@@ -8,11 +8,16 @@
android:id=
"@id/android:list"
android:id=
"@id/android:list"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
android:layout_height=
"fill_parent"
android:paddingLeft=
"20dip"
android:paddingRight=
"20dip"
android:scrollbarStyle=
"outsideInset"
android:numColumns=
"auto_fit"
android:numColumns=
"auto_fit"
android:fastScrollEnabled=
"true"
android:fastScrollEnabled=
"true"
android:horizontalSpacing=
"20dp"
android:horizontalSpacing=
"20dp"
android:verticalSpacing=
"20dp"
android:verticalSpacing=
"20dp"
android:stretchMode=
"spacingWidthUniform"
/>
android:stretchMode=
"spacingWidth"
android:background=
"@drawable/background_pattern_dark_repeat"
android:gravity=
"center"
/>
<LinearLayout
<LinearLayout
android:id=
"@id/android:empty"
android:id=
"@id/android:empty"
...
...
vlc-android/res/layout/video_grid_item.xml
View file @
1e0bc687
...
@@ -2,20 +2,20 @@
...
@@ -2,20 +2,20 @@
<LinearLayout
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/layout_item"
android:id=
"@+id/layout_item"
android:layout_width=
"15
0
dip"
android:layout_width=
"15
6
dip"
android:layout_height=
"150dip"
android:layout_height=
"150dip"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
>
android:background=
"#444"
>
<ImageView
<ImageView
android:id=
"@+id/ml_item_thumbnail"
android:id=
"@+id/ml_item_thumbnail"
android:layout_width=
"1
20
dip"
android:layout_width=
"1
56
dip"
android:layout_height=
"
80
dip"
android:layout_height=
"
104
dip"
android:scaleType=
"centerCrop"
android:scaleType=
"centerCrop"
android:layout_gravity=
"center_horizontal"
/>
android:layout_gravity=
"center_horizontal"
android:background=
"@android:color/black"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
0dp
"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
<TextView
...
@@ -26,13 +26,13 @@
...
@@ -26,13 +26,13 @@
android:ellipsize=
"end"
android:ellipsize=
"end"
android:maxLines=
"2"
android:maxLines=
"2"
android:textSize=
"12dip"
android:textSize=
"12dip"
android:textColor=
"@
android:color/whit
e"
/>
android:textColor=
"@
color/list_titl
e"
/>
<TextView
<TextView
android:id=
"@+id/ml_item_subtitle"
android:id=
"@+id/ml_item_subtitle"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:textSize=
"10dip"
android:textSize=
"10dip"
android:textColor=
"@
android:color/whit
e"
/>
android:textColor=
"@
color/list_subtitl
e"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
vlc-android/res/layout/video_list_item.xml
View file @
1e0bc687
...
@@ -10,11 +10,11 @@
...
@@ -10,11 +10,11 @@
android:id=
"@+id/ml_item_thumbnail"
android:id=
"@+id/ml_item_thumbnail"
android:layout_width=
"120dip"
android:layout_width=
"120dip"
android:layout_height=
"80dip"
android:layout_height=
"80dip"
android:scaleType=
"centerCrop"
/>
android:scaleType=
"centerCrop"
android:background=
"@android:color/black"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"
0dip
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
<TextView
android:id=
"@+id/ml_item_title"
android:id=
"@+id/ml_item_title"
...
...
vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
View file @
1e0bc687
...
@@ -104,14 +104,14 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
...
@@ -104,14 +104,14 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
11
)
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
11
)
columns
=
gv
.
getNumColumns
();
columns
=
gv
.
getNumColumns
();
float
density
=
getResources
().
getDisplayMetrics
().
density
;
if
(
columns
==
1
)
{
if
(
columns
==
1
)
{
gv
.
setNumColumns
(
1
);
gv
.
setNumColumns
(
1
);
gv
.
setStretchMode
(
GridView
.
STRETCH_COLUMN_WIDTH
);
gv
.
setStretchMode
(
GridView
.
STRETCH_COLUMN_WIDTH
);
gv
.
setHorizontalSpacing
(
0
);
gv
.
setHorizontalSpacing
(
0
);
gv
.
setVerticalSpacing
(
0
);
gv
.
setVerticalSpacing
(
(
int
)
(
10
*
density
+
0.5f
)
);
mVideoAdapter
.
setListMode
(
true
);
mVideoAdapter
.
setListMode
(
true
);
}
else
{
}
else
{
float
density
=
getResources
().
getDisplayMetrics
().
density
;
gv
.
setColumnWidth
((
int
)
(
150
*
density
+
0.5f
));
gv
.
setColumnWidth
((
int
)
(
150
*
density
+
0.5f
));
}
}
...
...
vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
View file @
1e0bc687
...
@@ -145,11 +145,11 @@ public class VideoListAdapter extends ArrayAdapter<Media>
...
@@ -145,11 +145,11 @@ public class VideoListAdapter extends ArrayAdapter<Media>
holder
=
(
ViewHolder
)
v
.
getTag
();
holder
=
(
ViewHolder
)
v
.
getTag
();
Media
media
=
getItem
(
position
);
Media
media
=
getItem
(
position
);
//Util.setItemBackground(holder.layout, position);
holder
.
title
.
setText
(
media
.
getTitle
());
holder
.
title
.
setText
(
media
.
getTitle
());
Bitmap
thumbnail
;
Bitmap
thumbnail
;
if
(
media
.
getPicture
()
!=
null
)
{
if
(
media
.
getPicture
()
!=
null
)
{
//FIXME Warning: the thumbnails are upscaled in the grid view!
thumbnail
=
media
.
getPicture
();
thumbnail
=
media
.
getPicture
();
holder
.
thumbnail
.
setImageBitmap
(
thumbnail
);
holder
.
thumbnail
.
setImageBitmap
(
thumbnail
);
}
else
{
}
else
{
...
@@ -161,7 +161,7 @@ public class VideoListAdapter extends ArrayAdapter<Media>
...
@@ -161,7 +161,7 @@ public class VideoListAdapter extends ArrayAdapter<Media>
ColorStateList
titleColor
=
v
.
getResources
().
getColorStateList
(
media
.
getLocation
().
equals
(
mLastMRL
)
ColorStateList
titleColor
=
v
.
getResources
().
getColorStateList
(
media
.
getLocation
().
equals
(
mLastMRL
)
?
R
.
color
.
list_title_last
?
R
.
color
.
list_title_last
:
R
.
color
.
list_title
);
:
R
.
color
.
list_title
);
//
holder.title.setTextColor(titleColor);
holder
.
title
.
setTextColor
(
titleColor
);
long
lastTime
=
media
.
getTime
();
long
lastTime
=
media
.
getTime
();
String
text
;
String
text
;
...
...
Write
Preview
Markdown
is supported
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