Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
528
Issue boards
Milestones
Wiki
Code
Merge requests
14
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
77110fb9
Commit
77110fb9
authored
8 years ago
by
Alexandre Perraud
Browse files
Options
Downloads
Patches
Plain Diff
Video : Add shuffle mode advanced option
parent
1059d970
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vlc-android/res/values/styles.xml
+1
-0
1 addition, 0 deletions
vlc-android/res/values/styles.xml
vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
+21
-0
21 additions, 0 deletions
...id/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
with
22 additions
and
0 deletions
vlc-android/res/values/styles.xml
+
1
−
0
View file @
77110fb9
...
...
@@ -214,6 +214,7 @@
<item
name=
"ic_audiodelay"
>
@drawable/ic_audiodelay_w
</item>
<item
name=
"ic_subtitledelay"
>
@drawable/ic_subtitledelay_w
</item>
<item
name=
"ic_repeat"
>
@drawable/ic_repeat_w
</item>
<item
name=
"ic_shuffle"
>
@drawable/ic_shuffle_w
</item>
<item
name=
"list_subtitle"
>
@color/grey400
</item>
<item
name=
"list_title_last"
>
@color/list_title_last
</item>
...
...
This diff is collapsed.
Click to expand it.
vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
+
21
−
0
View file @
77110fb9
...
...
@@ -87,6 +87,7 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
private
static
final
int
ID_SAVE_PLAYLIST
=
8
;
private
static
final
int
ID_POPUP_VIDEO
=
9
;
private
static
final
int
ID_REPEAT
=
10
;
private
static
final
int
ID_SHUFFLE
=
11
;
private
Activity
mActivity
;
private
int
mTheme
;
...
...
@@ -104,6 +105,7 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
private
TextView
mSpuDelay
;
private
TextView
mRepeat
;
private
TextView
mShuffle
;
private
TextView
mChaptersTitle
;
private
int
mTextColor
;
...
...
@@ -356,6 +358,15 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
}
}
public
void
initShuffle
(){
mShuffle
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
mService
.
isShuffling
()
?
R
.
drawable
.
ic_shuffle_on
:
UiTools
.
getResourceFromAttribute
(
mActivity
,
R
.
attr
.
ic_shuffle
),
0
,
0
);
}
private
void
initChapters
()
{
final
MediaPlayer
.
Chapter
[]
chapters
=
mService
.
getChapters
(-
1
);
...
...
@@ -405,6 +416,10 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
mRepeat
=
tv
;
initRepeat
();
break
;
case
ID_SHUFFLE:
mShuffle
=
tv
;
initShuffle
();
break
;
}
}
...
...
@@ -460,6 +475,10 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
case
ID_REPEAT:
setRepeatMode
();
break
;
case
ID_SHUFFLE:
mService
.
shuffle
();
initShuffle
();
break
;
}
}
...
...
@@ -538,6 +557,8 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
if
(!
tvUi
)
mAdapter
.
addOption
(
new
Option
(
ID_POPUP_VIDEO
,
R
.
attr
.
ic_popup_dim
));
mAdapter
.
addOption
(
new
Option
(
ID_REPEAT
,
R
.
attr
.
ic_repeat
));
if
(
mService
.
getMediaListSize
()
>
2
)
mAdapter
.
addOption
(
new
Option
(
ID_SHUFFLE
,
R
.
attr
.
ic_shuffle
));
final
MediaPlayer
.
Chapter
[]
chapters
=
mService
.
getChapters
(-
1
);
final
int
chaptersCount
=
chapters
!=
null
?
chapters
.
length
:
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment