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
543efe4e
Commit
543efe4e
authored
7 years ago
by
Alexandre Perraud
Browse files
Options
Downloads
Patches
Plain Diff
Add up and down action mode playlist actions
parent
473aa248
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/menu/action_mode_audio_browser.xml
+12
-0
12 additions, 0 deletions
vlc-android/res/menu/action_mode_audio_browser.xml
vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java
+15
-1
15 additions, 1 deletion
vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java
with
27 additions
and
1 deletion
vlc-android/res/menu/action_mode_audio_browser.xml
+
12
−
0
View file @
543efe4e
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:id=
"@+id/action_mode_audio_playlist_up"
android:title=
"@string/info"
android:icon=
"@drawable/ic_am_playlist_up_w"
android:visible=
"false"
app:showAsAction=
"always"
/>
<item
android:id=
"@+id/action_mode_audio_playlist_down"
android:title=
"@string/info"
android:icon=
"@drawable/ic_am_playlist_down_w"
android:visible=
"false"
app:showAsAction=
"always"
/>
<item
android:id=
"@+id/action_mode_audio_info"
android:title=
"@string/info"
...
...
This diff is collapsed.
Click to expand it.
vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java
+
15
−
1
View file @
543efe4e
...
...
@@ -45,6 +45,7 @@ import android.view.Gravity;
import
android.view.Menu
;
import
android.view.MenuItem
;
import
android.view.View
;
import
android.widget.Toast
;
import
org.videolan.medialibrary.Medialibrary
;
import
org.videolan.medialibrary.media.MediaLibraryItem
;
...
...
@@ -243,7 +244,9 @@ public class PlaylistActivity extends AudioPlayerContainerActivity implements IE
return
false
;
}
boolean
isSong
=
count
==
1
&&
mAdapter
.
getSelection
().
get
(
0
).
getItemType
()
==
MediaLibraryItem
.
TYPE_MEDIA
;
menu
.
findItem
(
R
.
id
.
action_mode_audio_set_song
).
setVisible
(
isSong
&&
AndroidDevices
.
isPhone
());
menu
.
findItem
(
R
.
id
.
action_mode_audio_playlist_up
).
setVisible
(
isSong
&&
mIsPlaylist
);
menu
.
findItem
(
R
.
id
.
action_mode_audio_playlist_down
).
setVisible
(
isSong
&&
mIsPlaylist
);
menu
.
findItem
(
R
.
id
.
action_mode_audio_set_song
).
setVisible
(
isSong
&&
AndroidDevices
.
isPhone
()
&&
!
mIsPlaylist
);
menu
.
findItem
(
R
.
id
.
action_mode_audio_info
).
setVisible
(
isSong
);
menu
.
findItem
(
R
.
id
.
action_mode_audio_append
).
setVisible
(
mService
.
hasMedia
());
menu
.
findItem
(
R
.
id
.
action_mode_audio_delete
).
setVisible
(
mIsPlaylist
);
...
...
@@ -256,6 +259,17 @@ public class PlaylistActivity extends AudioPlayerContainerActivity implements IE
ArrayList
<
MediaWrapper
>
tracks
=
new
ArrayList
<>();
for
(
MediaLibraryItem
mediaItem
:
list
)
tracks
.
addAll
(
Arrays
.
asList
(
mediaItem
.
getTracks
()));
if
(
item
.
getItemId
()
==
R
.
id
.
action_mode_audio_playlist_up
)
{
Toast
.
makeText
(
this
,
"UP !"
,
Toast
.
LENGTH_SHORT
).
show
();
return
true
;
}
if
(
item
.
getItemId
()
==
R
.
id
.
action_mode_audio_playlist_down
)
{
Toast
.
makeText
(
this
,
"DOWN !"
,
Toast
.
LENGTH_SHORT
).
show
();
return
true
;
}
stopActionMode
();
switch
(
item
.
getItemId
())
{
case
R
.
id
.
action_mode_audio_play
:
...
...
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