Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Casanowow Life for love
VLC-Android
Commits
2792575e
Commit
2792575e
authored
Feb 24, 2014
by
Adrien Maglo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Styles: replace colors by attributes
parent
a0cd36e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
vlc-android/src/org/videolan/vlc/gui/audio/AudioPlaylistAdapter.java
.../src/org/videolan/vlc/gui/audio/AudioPlaylistAdapter.java
+5
-2
vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
...roid/src/org/videolan/vlc/gui/video/VideoListAdapter.java
+4
-1
No files found.
vlc-android/src/org/videolan/vlc/gui/audio/AudioPlaylistAdapter.java
View file @
2792575e
...
...
@@ -25,6 +25,7 @@ import java.util.List;
import
org.videolan.libvlc.Media
;
import
org.videolan.vlc.R
;
import
org.videolan.vlc.Util
;
import
org.videolan.vlc.widget.AudioPlaylistItemViewGroup
;
import
android.content.Context
;
...
...
@@ -45,9 +46,11 @@ public class AudioPlaylistAdapter extends ArrayAdapter<Media> {
private
ArrayList
<
Media
>
mMediaList
;
private
int
mCurrentIndex
;
private
Context
mContext
;
public
AudioPlaylistAdapter
(
Context
context
)
{
super
(
context
,
0
);
mContext
=
context
;
mMediaList
=
new
ArrayList
<
Media
>();
mCurrentIndex
=
-
1
;
}
...
...
@@ -106,8 +109,8 @@ public class AudioPlaylistAdapter extends ArrayAdapter<Media> {
holder
.
title
.
setText
(
title
);
ColorStateList
titleColor
=
v
.
getResources
().
getColorStateList
(
mCurrentIndex
==
position
?
R
.
colo
r
.
list_title_last
:
R
.
colo
r
.
list_title
);
?
Util
.
getResourceFromAttribute
(
mContext
,
R
.
att
r
.
list_title_last
)
:
Util
.
getResourceFromAttribute
(
mContext
,
R
.
att
r
.
list_title
)
)
;
holder
.
title
.
setTextColor
(
titleColor
);
holder
.
artist
.
setText
(
artist
);
holder
.
position
=
position
;
...
...
vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
View file @
2792575e
...
...
@@ -51,10 +51,12 @@ public class VideoListAdapter extends ArrayAdapter<Media>
private
int
mSortDirection
=
1
;
private
int
mSortBy
=
SORT_BY_TITLE
;
private
boolean
mListMode
=
false
;
private
Context
mContext
;
private
VideoGridFragment
mFragment
;
public
VideoListAdapter
(
Context
context
,
VideoGridFragment
fragment
)
{
super
(
context
,
0
);
mContext
=
context
;
mFragment
=
fragment
;
}
...
...
@@ -179,7 +181,8 @@ public class VideoListAdapter extends ArrayAdapter<Media>
holder
.
thumbnail
.
setImageBitmap
(
thumbnail
);
/* Color state */
ColorStateList
titleColor
=
v
.
getResources
().
getColorStateList
(
R
.
color
.
list_title
);
ColorStateList
titleColor
=
v
.
getResources
().
getColorStateList
(
Util
.
getResourceFromAttribute
(
mContext
,
R
.
attr
.
list_title
));
holder
.
title
.
setTextColor
(
titleColor
);
if
(
media
instanceof
MediaGroup
)
...
...
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