Add enqueue and playlist icons
This commit is contained in:
parent
cb29edc3b8
commit
872ec273dd
9 changed files with 105 additions and 95 deletions
|
@ -321,7 +321,7 @@ fun MediaItemMenu(
|
|||
onAddToPlaylist?.let { onAddToPlaylist ->
|
||||
playlistPreviews.forEach { playlistPreview ->
|
||||
MenuEntry(
|
||||
icon = R.drawable.list,
|
||||
icon = R.drawable.playlist,
|
||||
text = playlistPreview.playlist.name,
|
||||
secondaryText = "${playlistPreview.songCount} songs",
|
||||
onClick = {
|
||||
|
@ -370,7 +370,7 @@ fun MediaItemMenu(
|
|||
|
||||
onPlayNext?.let { onPlayNext ->
|
||||
MenuEntry(
|
||||
icon = R.drawable.play,
|
||||
icon = R.drawable.play_skip_forward,
|
||||
text = "Play next",
|
||||
onClick = {
|
||||
onDismiss()
|
||||
|
@ -381,7 +381,7 @@ fun MediaItemMenu(
|
|||
|
||||
onEnqueue?.let { onEnqueue ->
|
||||
MenuEntry(
|
||||
icon = R.drawable.time,
|
||||
icon = R.drawable.enqueue,
|
||||
text = "Enqueue",
|
||||
onClick = {
|
||||
onDismiss()
|
||||
|
@ -390,42 +390,9 @@ fun MediaItemMenu(
|
|||
)
|
||||
}
|
||||
|
||||
onRemoveFromQueue?.let { onRemoveFromQueue ->
|
||||
MenuEntry(
|
||||
icon = R.drawable.trash,
|
||||
text = "Remove",
|
||||
onClick = {
|
||||
onDismiss()
|
||||
onRemoveFromQueue()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
onRemoveFromFavorites?.let { onRemoveFromFavorites ->
|
||||
MenuEntry(
|
||||
icon = R.drawable.heart_dislike,
|
||||
text = "Dislike",
|
||||
onClick = {
|
||||
onDismiss()
|
||||
onRemoveFromFavorites()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
onRemoveFromPlaylist?.let { onRemoveFromPlaylist ->
|
||||
MenuEntry(
|
||||
icon = R.drawable.trash,
|
||||
text = "Remove",
|
||||
onClick = {
|
||||
onDismiss()
|
||||
onRemoveFromPlaylist()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (onAddToPlaylist != null) {
|
||||
MenuEntry(
|
||||
icon = R.drawable.list,
|
||||
icon = R.drawable.playlist,
|
||||
text = "Add to playlist",
|
||||
onClick = {
|
||||
viewPlaylistsRoute()
|
||||
|
@ -481,11 +448,44 @@ fun MediaItemMenu(
|
|||
)
|
||||
}
|
||||
|
||||
onHideFromDatabase?.let { onDeleteFromDatabase ->
|
||||
onRemoveFromQueue?.let { onRemoveFromQueue ->
|
||||
MenuEntry(
|
||||
icon = R.drawable.trash,
|
||||
text = "Remove from queue",
|
||||
onClick = {
|
||||
onDismiss()
|
||||
onRemoveFromQueue()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
onRemoveFromFavorites?.let { onRemoveFromFavorites ->
|
||||
MenuEntry(
|
||||
icon = R.drawable.heart_dislike,
|
||||
text = "Remove from favorites",
|
||||
onClick = {
|
||||
onDismiss()
|
||||
onRemoveFromFavorites()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
onRemoveFromPlaylist?.let { onRemoveFromPlaylist ->
|
||||
MenuEntry(
|
||||
icon = R.drawable.trash,
|
||||
text = "Remove from playlist",
|
||||
onClick = {
|
||||
onDismiss()
|
||||
onRemoveFromPlaylist()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
onHideFromDatabase?.let { onHideFromDatabase ->
|
||||
MenuEntry(
|
||||
icon = R.drawable.trash,
|
||||
text = "Hide",
|
||||
onClick = onDeleteFromDatabase
|
||||
onClick = onHideFromDatabase
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ fun AlbumScreen(
|
|||
MenuCloseButton(onClick = menuState::hide)
|
||||
|
||||
MenuEntry(
|
||||
icon = R.drawable.time,
|
||||
icon = R.drawable.enqueue,
|
||||
text = "Enqueue",
|
||||
onClick = {
|
||||
menuState.hide()
|
||||
|
@ -159,7 +159,7 @@ fun AlbumScreen(
|
|||
)
|
||||
|
||||
MenuEntry(
|
||||
icon = R.drawable.list,
|
||||
icon = R.drawable.playlist,
|
||||
text = "Import as playlist",
|
||||
onClick = {
|
||||
menuState.hide()
|
||||
|
|
|
@ -117,7 +117,7 @@ fun BuiltInPlaylistScreen(
|
|||
MenuCloseButton(onClick = menuState::hide)
|
||||
|
||||
MenuEntry(
|
||||
icon = R.drawable.time,
|
||||
icon = R.drawable.enqueue,
|
||||
text = "Enqueue",
|
||||
isEnabled = songs.isNotEmpty(),
|
||||
onClick = {
|
||||
|
|
|
@ -160,7 +160,7 @@ fun IntentUriScreen(uri: Uri) {
|
|||
MenuCloseButton(onClick = menuState::hide)
|
||||
|
||||
MenuEntry(
|
||||
icon = R.drawable.time,
|
||||
icon = R.drawable.enqueue,
|
||||
text = "Enqueue",
|
||||
onClick = {
|
||||
menuState.hide()
|
||||
|
@ -177,7 +177,7 @@ fun IntentUriScreen(uri: Uri) {
|
|||
)
|
||||
|
||||
MenuEntry(
|
||||
icon = R.drawable.list,
|
||||
icon = R.drawable.playlist,
|
||||
text = "Import as playlist",
|
||||
onClick = {
|
||||
isImportingAsPlaylist = true
|
||||
|
|
|
@ -151,7 +151,7 @@ fun LocalPlaylistScreen(
|
|||
MenuCloseButton(onClick = menuState::hide)
|
||||
|
||||
MenuEntry(
|
||||
icon = R.drawable.time,
|
||||
icon = R.drawable.enqueue,
|
||||
text = "Enqueue",
|
||||
isEnabled = playlistWithSongs.songs.isNotEmpty(),
|
||||
onClick = {
|
||||
|
|
|
@ -124,7 +124,7 @@ fun PlaylistScreen(
|
|||
MenuCloseButton(onClick = menuState::hide)
|
||||
|
||||
MenuEntry(
|
||||
icon = R.drawable.time,
|
||||
icon = R.drawable.enqueue,
|
||||
text = "Enqueue",
|
||||
onClick = {
|
||||
menuState.hide()
|
||||
|
@ -143,7 +143,7 @@ fun PlaylistScreen(
|
|||
)
|
||||
|
||||
MenuEntry(
|
||||
icon = R.drawable.list,
|
||||
icon = R.drawable.playlist,
|
||||
text = "Import",
|
||||
onClick = {
|
||||
menuState.hide()
|
||||
|
|
12
app/src/main/res/drawable/enqueue.xml
Normal file
12
app/src/main/res/drawable/enqueue.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="m311.44,408.02a64,64 0,1 0,96 -55.39v-209.22a64,64 0,1 0,-64 0v209.22a64,64 0,0 0,-32 55.39zM375.44,440.02a32,32 0,1 1,32 -32,32 32,0 0,1 -32,32zM375.44,56.02a32,32 0,1 1,-32 32,32 32,0 0,1 32,-32z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="m87.44,143.41v204.61a92.1,92.1 0,0 0,92 92h20v32a16,16 0,0 0,27.31 11.31l64,-64a16,16 0,0 0,0 -22.62l-64,-64a16,16 0,0 0,-27.31 11.31v32h-20a28,28 0,0 1,-28 -28v-204.61a64,64 0,1 0,-64 0zM119.44,56.02a32,32 0,1 1,-32 32,32 32,0 0,1 32,-32z"/>
|
||||
</vector>
|
|
@ -1,48 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path
|
||||
android:pathData="M160,144L448,144"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="48"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M160,256L448,256"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="48"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M160,368L448,368"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="48"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M80,144m-16,0a16,16 0,1 1,32 0a16,16 0,1 1,-32 0"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="32"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M80,256m-16,0a16,16 0,1 1,32 0a16,16 0,1 1,-32 0"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="32"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M80,368m-16,0a16,16 0,1 1,32 0a16,16 0,1 1,-32 0"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="32"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
46
app/src/main/res/drawable/playlist.xml
Normal file
46
app/src/main/res/drawable/playlist.xml
Normal file
|
@ -0,0 +1,46 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path
|
||||
android:pathData="M160,127.57L448,127.57"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="48"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000000"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M80,127.57m-16,0a16,16 0,1 1,32 0a16,16 0,1 1,-32 0"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="32"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000000"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M80,239.57m-16,0a16,16 0,1 1,32 0a16,16 0,1 1,-32 0"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="32"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000000"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M80,351.57m-16,0a16,16 0,1 1,32 0a16,16 0,1 1,-32 0"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="32"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000000"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M160,327.57L217.67,327.57A24,24 0,0 1,241.67 351.57L241.67,351.57A24,24 0,0 1,217.67 375.57L160,375.57A24,24 0,0 1,136 351.57L136,351.57A24,24 0,0 1,160 327.57z"
|
||||
android:strokeWidth="8.97186"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M160,215.57L299.31,215.57A24,24 0,0 1,323.31 239.57L323.31,239.57A24,24 0,0 1,299.31 263.57L160,263.57A24,24 0,0 1,136 239.57L136,239.57A24,24 0,0 1,160 215.57z"
|
||||
android:strokeWidth="11.9451"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="m340.64,475.92a36.22,36.22 0,0 1,-21.24 -6.92,37.17 37.17,0 0,1 -15.4,-30.1 32.98,32.98 0,0 1,22.4 -31.32l33.38,-11.23a10.66,10.66 0,0 0,7.22 -10.17V221.3a21.07,21.07 0,0 1,15.81 -20.44l71.13,-18.47a14.44,14.44 0,0 1,18.06 13.97v37.9a21.06,21.06 0,0 1,-15.88 20.47l-60.15,15.18a10.66,10.66 0,0 0,-7.97 10.4v158.87a31.64,31.64 0,0 1,-21.51 30.06l-14.09,4.74a36.75,36.75 0,0 1,-11.76 1.94z"
|
||||
android:strokeWidth="0.656249"/>
|
||||
</vector>
|
Loading…
Reference in a new issue