From 209e3d58eb4573cfb35d82b61edf9ca0c3a5ee82 Mon Sep 17 00:00:00 2001 From: Hemanth S Date: Sun, 27 Sep 2020 02:09:07 +0530 Subject: [PATCH] Updated Item list to support big screen Fix search for playlist Fix playlist crash --- .../activities/LockScreenActivity.kt | 24 +-- .../retromusic/activities/MainActivity.kt | 13 +- .../activities/PlayingQueueActivity.kt | 20 +-- .../monkey/retromusic/adapter/GenreAdapter.kt | 3 - .../retromusic/adapter/SearchAdapter.kt | 40 +++-- .../adapter/base/MediaEntryViewHolder.java | 10 +- .../adapter/song/AbsOffsetSongAdapter.kt | 4 +- .../adapter/song/PlayingQueueAdapter.kt | 2 +- .../adapter/song/PlaylistSongAdapter.kt | 53 ++---- .../retromusic/adapter/song/SongAdapter.kt | 8 +- .../monkey/retromusic/db/SongExtension.kt | 7 + .../fragments/DetailListFragment.kt | 22 +-- .../retromusic/fragments/LibraryViewModel.kt | 34 ++-- .../fragments/albums/AlbumDetailsFragment.kt | 3 - .../artists/ArtistDetailsFragment.kt | 3 - .../fragments/base/AbsMainActivityFragment.kt | 3 + .../fragments/base/AbsPlayerFragment.kt | 3 - .../fragments/base/AbsRecyclerViewFragment.kt | 4 - .../fragments/folder/FoldersFragment.java | 2 + .../fragments/genres/GenreDetailsFragment.kt | 3 - .../retromusic/fragments/home/HomeFragment.kt | 5 +- .../fragments/library/LibraryFragment.kt | 4 - .../playlists/PlaylistDetailsFragment.kt | 96 +++-------- .../fragments/search/SearchFragment.kt | 3 - .../monkey/retromusic/model/PlaylistSong.kt | 2 +- .../repository/PlaylistSongsLoader.kt | 5 +- .../retromusic/repository/Repository.kt | 20 ++- .../retromusic/repository/SearchRepository.kt | 10 +- .../res/layout-land/fragment_banner_home.xml | 47 +++++- .../main/res/layout-land/fragment_home.xml | 153 ++++++++++------- .../layout-sw600dp/activity_playing_queue.xml | 155 ++++++++++++++++++ app/src/main/res/layout-sw600dp/item_list.xml | 123 ++++++++++++++ .../res/layout-sw600dp/item_list_no_image.xml | 64 ++++++++ .../main/res/layout-sw600dp/item_queue.xml | 126 ++++++++++++++ .../res/layout/activity_playing_queue.xml | 81 ++++++++- app/src/main/res/layout/item_list.xml | 136 +++++++-------- .../main/res/layout/item_list_no_image.xml | 5 +- app/src/main/res/layout/item_queue.xml | 92 +++++++---- app/src/main/res/layout/sub_header.xml | 3 +- .../main/res/master/values-af-rZA/strings.xml | 2 +- .../main/res/master/values-bn-rIN/strings.xml | 2 +- .../main/res/master/values-ca-rES/strings.xml | 2 +- .../main/res/master/values-da-rDK/strings.xml | 2 +- .../main/res/master/values-en-rUS/strings.xml | 2 +- .../main/res/master/values-fa-rIR/strings.xml | 2 +- .../main/res/master/values-fi-rFI/strings.xml | 2 +- .../main/res/master/values-hi-rIN/strings.xml | 2 +- .../main/res/master/values-iw-rIL/strings.xml | 2 +- .../main/res/master/values-kn-rIN/strings.xml | 2 +- .../main/res/master/values-ml-rIN/strings.xml | 2 +- .../main/res/master/values-ne-rIN/strings.xml | 2 +- .../main/res/master/values-no-rNO/strings.xml | 2 +- .../main/res/master/values-or-rIN/strings.xml | 2 +- .../main/res/master/values-pt-rPT/strings.xml | 2 +- .../main/res/master/values-sk-rSK/strings.xml | 2 +- .../main/res/master/values-sv-rSE/strings.xml | 2 +- .../main/res/master/values-ta-rIN/strings.xml | 2 +- .../main/res/master/values-ur-rIN/strings.xml | 2 +- app/src/main/res/values-af-rZA/strings.xml | 2 +- app/src/main/res/values-bn-rIN/strings.xml | 2 +- app/src/main/res/values-ca-rES/strings.xml | 2 +- app/src/main/res/values-da-rDK/strings.xml | 2 +- app/src/main/res/values-en-rHK/strings.xml | 2 +- app/src/main/res/values-en-rID/strings.xml | 2 +- app/src/main/res/values-en-rIN/strings.xml | 2 +- app/src/main/res/values-en-rUS/strings.xml | 2 +- app/src/main/res/values-fa-rIR/strings.xml | 2 +- app/src/main/res/values-fi-rFI/strings.xml | 2 +- app/src/main/res/values-hi-rIN/strings.xml | 2 +- app/src/main/res/values-iw-rIL/strings.xml | 2 +- app/src/main/res/values-kn-rIN/strings.xml | 2 +- app/src/main/res/values-ml-rIN/strings.xml | 2 +- app/src/main/res/values-ne-rIN/strings.xml | 2 +- app/src/main/res/values-no-rNO/strings.xml | 2 +- app/src/main/res/values-or-rIN/strings.xml | 2 +- app/src/main/res/values-pt-rPT/strings.xml | 2 +- app/src/main/res/values-sk-rSK/strings.xml | 2 +- app/src/main/res/values-ta-rIN/strings.xml | 2 +- app/src/main/res/values-ur-rIN/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 80 files changed, 1025 insertions(+), 448 deletions(-) create mode 100644 app/src/main/res/layout-sw600dp/activity_playing_queue.xml create mode 100644 app/src/main/res/layout-sw600dp/item_list.xml create mode 100644 app/src/main/res/layout-sw600dp/item_list_no_image.xml create mode 100644 app/src/main/res/layout-sw600dp/item_queue.xml diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/LockScreenActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/LockScreenActivity.kt index 81ddfd8b..9ff98437 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/LockScreenActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/LockScreenActivity.kt @@ -28,16 +28,7 @@ class LockScreenActivity : AbsMusicServiceActivity() { override fun onCreate(savedInstanceState: Bundle?) { setDrawUnderStatusBar() super.onCreate(savedInstanceState) - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) { - setShowWhenLocked(true) - val keyguardManager = getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager - keyguardManager.requestDismissKeyguard(this, null) - } else { - this.window.addFlags( - WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or - WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED - ) - } + lockScreenInit() setContentView(R.layout.activity_lock_screen) hideStatusBar() setStatusbarColorAuto() @@ -77,6 +68,19 @@ class LockScreenActivity : AbsMusicServiceActivity() { } } + private fun lockScreenInit() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) { + setShowWhenLocked(true) + val keyguardManager: KeyguardManager = getSystemService(KeyguardManager::class.java) + keyguardManager.requestDismissKeyguard(this, null) + } else { + this.window.addFlags( + WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or + WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED + ) + } + } + override fun onPlayingMetaChanged() { super.onPlayingMetaChanged() updateSongs() diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/MainActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/MainActivity.kt index 2d4023d9..e11028fc 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/MainActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/MainActivity.kt @@ -22,6 +22,7 @@ import code.name.monkey.retromusic.util.AppRater import code.name.monkey.retromusic.util.PreferenceUtil import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.launch +import org.koin.android.ext.android.get class MainActivity : AbsSlidingMusicPanelActivity(), OnSharedPreferenceChangeListener { companion object { @@ -37,6 +38,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(), OnSharedPreferenceChangeLis override fun onCreate(savedInstanceState: Bundle?) { setDrawUnderStatusBar() super.onCreate(savedInstanceState) + setupNavigationController() if (!hasPermissions()) { findNavController(R.id.fragment_container).navigate(R.id.permissionFragment) } @@ -49,7 +51,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(), OnSharedPreferenceChangeLis updateTabs() //NavigationUI.setupWithNavController(getBottomNavigationView(), findNavController(R.id.fragment_container)) - setupNavigationController() + } private fun setupNavigationController() { @@ -121,8 +123,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(), OnSharedPreferenceChangeLis val id = parseLongFromIntent(intent, "playlistId", "playlist") if (id >= 0L) { val position: Int = intent.getIntExtra("position", 0) - val songs: List = - PlaylistSongsLoader.getPlaylistSongList(this@MainActivity, id) + val songs: List = PlaylistSongsLoader.getPlaylistSongList(get(), id) MusicPlayerRemote.openQueue(songs, position, true) handled = true } @@ -130,8 +131,9 @@ class MainActivity : AbsSlidingMusicPanelActivity(), OnSharedPreferenceChangeLis val id = parseLongFromIntent(intent, "albumId", "album") if (id >= 0L) { val position: Int = intent.getIntExtra("position", 0) + val songs = libraryViewModel.albumById(id).songs MusicPlayerRemote.openQueue( - libraryViewModel.albumById(id).songs, + songs, position, true ) @@ -141,8 +143,9 @@ class MainActivity : AbsSlidingMusicPanelActivity(), OnSharedPreferenceChangeLis val id = parseLongFromIntent(intent, "artistId", "artist") if (id >= 0L) { val position: Int = intent.getIntExtra("position", 0) + val songs: List = libraryViewModel.artistById(id).songs MusicPlayerRemote.openQueue( - libraryViewModel.artistById(id).songs, + songs, position, true ) diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/PlayingQueueActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/PlayingQueueActivity.kt index 9906db0b..1218c71c 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/PlayingQueueActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/PlayingQueueActivity.kt @@ -13,7 +13,6 @@ import code.name.monkey.retromusic.adapter.song.PlayingQueueAdapter import code.name.monkey.retromusic.extensions.accentColor import code.name.monkey.retromusic.extensions.surfaceColor import code.name.monkey.retromusic.helper.MusicPlayerRemote -import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.ThemedFastScroller import com.h6ah4i.android.widget.advrecyclerview.animator.DraggableItemAnimator import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager @@ -21,6 +20,7 @@ import com.h6ah4i.android.widget.advrecyclerview.swipeable.RecyclerViewSwipeMana import com.h6ah4i.android.widget.advrecyclerview.touchguard.RecyclerViewTouchActionGuardManager import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils import kotlinx.android.synthetic.main.activity_playing_queue.* +import kotlinx.android.synthetic.main.activity_playing_queue.title as NoImageTitle open class PlayingQueueActivity : AbsMusicServiceActivity() { @@ -31,13 +31,6 @@ open class PlayingQueueActivity : AbsMusicServiceActivity() { private var playingQueueAdapter: PlayingQueueAdapter? = null private lateinit var linearLayoutManager: LinearLayoutManager - private fun getUpNextAndQueueTime(): String { - val duration = MusicPlayerRemote.getQueueDurationMillis(MusicPlayerRemote.position) - return MusicUtil.buildInfoString( - resources.getString(R.string.up_next), - MusicUtil.getReadableDurationString(duration) - ) - } override fun onCreate(savedInstanceState: Bundle?) { setDrawUnderStatusBar() @@ -54,7 +47,6 @@ open class PlayingQueueActivity : AbsMusicServiceActivity() { clearQueue.setOnClickListener { MusicPlayerRemote.clearQueue() } - checkForPadding() } override fun onOptionsItemSelected(item: MenuItem): Boolean { @@ -107,7 +99,8 @@ open class PlayingQueueActivity : AbsMusicServiceActivity() { ThemedFastScroller.create(recyclerView) } - private fun checkForPadding() { + override fun onServiceConnected() { + updateCurrentSong() } override fun onQueueChanged() { @@ -115,7 +108,6 @@ open class PlayingQueueActivity : AbsMusicServiceActivity() { finish() return } - checkForPadding() updateQueue() updateCurrentSong() } @@ -126,7 +118,9 @@ open class PlayingQueueActivity : AbsMusicServiceActivity() { } private fun updateCurrentSong() { - toolbar.subtitle = getUpNextAndQueueTime() + NoImageTitle.text = MusicPlayerRemote.currentSong.title + text.text = MusicPlayerRemote.currentSong.artistName + text2?.text = MusicPlayerRemote.currentSong.albumName } override fun onPlayingMetaChanged() { @@ -136,7 +130,6 @@ open class PlayingQueueActivity : AbsMusicServiceActivity() { private fun updateQueuePosition() { playingQueueAdapter?.setCurrent(MusicPlayerRemote.position) resetToCurrentPosition() - toolbar.subtitle = getUpNextAndQueueTime() } private fun updateQueue() { @@ -174,7 +167,6 @@ open class PlayingQueueActivity : AbsMusicServiceActivity() { } private fun setupToolbar() { - toolbar.subtitle = getUpNextAndQueueTime() toolbar.setBackgroundColor(surfaceColor()) setSupportActionBar(toolbar) clearQueue.backgroundTintList = ColorStateList.valueOf(accentColor()) diff --git a/app/src/main/java/code/name/monkey/retromusic/adapter/GenreAdapter.kt b/app/src/main/java/code/name/monkey/retromusic/adapter/GenreAdapter.kt index bf9f1c91..595eafae 100644 --- a/app/src/main/java/code/name/monkey/retromusic/adapter/GenreAdapter.kt +++ b/app/src/main/java/code/name/monkey/retromusic/adapter/GenreAdapter.kt @@ -1,6 +1,5 @@ package code.name.monkey.retromusic.adapter -import android.graphics.Color import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -23,14 +22,12 @@ class GenreAdapter( var dataSet: List, private val mItemLayoutRes: Int ) : RecyclerView.Adapter() { - val colors = listOf(Color.RED, Color.BLUE) override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { return ViewHolder(LayoutInflater.from(activity).inflate(mItemLayoutRes, parent, false)) } override fun onBindViewHolder(holder: ViewHolder, position: Int) { val genre = dataSet[position] - holder.title?.text = genre.name holder.text?.text = String.format( Locale.getDefault(), diff --git a/app/src/main/java/code/name/monkey/retromusic/adapter/SearchAdapter.kt b/app/src/main/java/code/name/monkey/retromusic/adapter/SearchAdapter.kt index 21d1b92a..537f9b6a 100644 --- a/app/src/main/java/code/name/monkey/retromusic/adapter/SearchAdapter.kt +++ b/app/src/main/java/code/name/monkey/retromusic/adapter/SearchAdapter.kt @@ -4,12 +4,15 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.core.os.bundleOf +import androidx.core.view.isInvisible +import androidx.core.view.isVisible import androidx.fragment.app.FragmentActivity import androidx.navigation.findNavController import androidx.recyclerview.widget.RecyclerView import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.retromusic.* import code.name.monkey.retromusic.adapter.base.MediaEntryViewHolder +import code.name.monkey.retromusic.db.PlaylistWithSongs import code.name.monkey.retromusic.glide.AlbumGlideRequest import code.name.monkey.retromusic.glide.ArtistGlideRequest import code.name.monkey.retromusic.helper.MusicPlayerRemote @@ -19,6 +22,7 @@ import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist import code.name.monkey.retromusic.repository.PlaylistSongsLoader import code.name.monkey.retromusic.util.MusicUtil import com.bumptech.glide.Glide +import java.util.* class SearchAdapter( private val activity: FragmentActivity, @@ -34,7 +38,7 @@ class SearchAdapter( if (dataSet[position] is Album) return ALBUM if (dataSet[position] is Artist) return ARTIST if (dataSet[position] is Genre) return GENRE - if (dataSet[position] is Playlist) return PLAYLIST + if (dataSet[position] is PlaylistWithSongs) return PLAYLIST return if (dataSet[position] is Song) SONG else HEADER } @@ -56,42 +60,52 @@ class SearchAdapter( override fun onBindViewHolder(holder: ViewHolder, position: Int) { when (getItemViewType(position)) { ALBUM -> { - val album = dataSet.get(position) as Album + holder. imageTextContainer?.isVisible = true + val album = dataSet[position] as Album holder.title?.text = album.title holder.text?.text = album.artistName AlbumGlideRequest.Builder.from(Glide.with(activity), album.safeGetFirstSong()) .checkIgnoreMediaStore().build().into(holder.image) } ARTIST -> { - val artist = dataSet.get(position) as Artist + holder. imageTextContainer?.isVisible = true + val artist = dataSet[position] as Artist holder.title?.text = artist.name holder.text?.text = MusicUtil.getArtistInfoString(activity, artist) ArtistGlideRequest.Builder.from(Glide.with(activity), artist).build() .into(holder.image) } SONG -> { - val song = dataSet.get(position) as Song + val song = dataSet[position] as Song holder.title?.text = song.title holder.text?.text = song.albumName } GENRE -> { - val genre = dataSet.get(position) as Genre + val genre = dataSet[position] as Genre holder.title?.text = genre.name + holder.text?.text = String.format( + Locale.getDefault(), + "%d %s", + genre.songCount, + if (genre.songCount > 1) activity.getString(R.string.songs) else activity.getString( + R.string.song + ) + ) } PLAYLIST -> { - val playlist = dataSet.get(position) as Playlist - holder.title?.text = playlist.name - holder.text?.text = MusicUtil.getPlaylistInfoString(activity, getSongs(playlist)) + val playlist = dataSet[position] as PlaylistWithSongs + holder.title?.text = playlist.playlistEntity.playlistName + holder.text?.text = MusicUtil.playlistInfoString(activity, playlist.songs) } else -> { - holder.title?.text = dataSet.get(position).toString() + holder.title?.text = dataSet[position].toString() holder.title?.setTextColor(ThemeStore.accentColor(activity)) } } } - private fun getSongs(playlist: Playlist): java.util.ArrayList { - val songs = java.util.ArrayList() + private fun getSongs(playlist: Playlist): List { + val songs = mutableListOf() if (playlist is AbsSmartPlaylist) { songs.addAll(playlist.getSongs()) } else { @@ -107,7 +121,7 @@ class SearchAdapter( inner class ViewHolder(itemView: View, itemViewType: Int) : MediaEntryViewHolder(itemView) { init { itemView.setOnLongClickListener(null) - + imageTextContainer?.isInvisible = true if (itemViewType == SONG) { menu?.visibility = View.VISIBLE menu?.setOnClickListener(object : SongMenuHelper.OnClickSongMenu(activity) { @@ -156,7 +170,7 @@ class SearchAdapter( ) } SONG -> { - val playList = ArrayList() + val playList = mutableListOf() playList.add(item as Song) MusicPlayerRemote.openQueue(playList, 0, true) } diff --git a/app/src/main/java/code/name/monkey/retromusic/adapter/base/MediaEntryViewHolder.java b/app/src/main/java/code/name/monkey/retromusic/adapter/base/MediaEntryViewHolder.java index 87460143..ae558723 100644 --- a/app/src/main/java/code/name/monkey/retromusic/adapter/base/MediaEntryViewHolder.java +++ b/app/src/main/java/code/name/monkey/retromusic/adapter/base/MediaEntryViewHolder.java @@ -16,7 +16,6 @@ package code.name.monkey.retromusic.adapter.base; import android.graphics.Color; import android.view.View; -import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; @@ -41,15 +40,13 @@ public class MediaEntryViewHolder extends AbstractDraggableSwipeableItemViewHold @Nullable public ImageView image; + @Nullable public ImageView artistImage; @Nullable public ImageView playerImage; - @Nullable - public ViewGroup imageContainer; - @Nullable public MaterialCardView imageContainerCard; @@ -77,6 +74,9 @@ public class MediaEntryViewHolder extends AbstractDraggableSwipeableItemViewHold @Nullable public TextView text; + @Nullable + public TextView text2; + @Nullable public TextView time; @@ -87,6 +87,7 @@ public class MediaEntryViewHolder extends AbstractDraggableSwipeableItemViewHold super(itemView); title = itemView.findViewById(R.id.title); text = itemView.findViewById(R.id.text); + text2 = itemView.findViewById(R.id.text2); image = itemView.findViewById(R.id.image); artistImage = itemView.findViewById(R.id.artistImage); @@ -94,7 +95,6 @@ public class MediaEntryViewHolder extends AbstractDraggableSwipeableItemViewHold time = itemView.findViewById(R.id.time); imageText = itemView.findViewById(R.id.imageText); - imageContainer = itemView.findViewById(R.id.imageContainer); imageTextContainer = itemView.findViewById(R.id.imageTextContainer); imageContainerCard = itemView.findViewById(R.id.imageContainerCard); diff --git a/app/src/main/java/code/name/monkey/retromusic/adapter/song/AbsOffsetSongAdapter.kt b/app/src/main/java/code/name/monkey/retromusic/adapter/song/AbsOffsetSongAdapter.kt index 9904bc5b..35cf5791 100644 --- a/app/src/main/java/code/name/monkey/retromusic/adapter/song/AbsOffsetSongAdapter.kt +++ b/app/src/main/java/code/name/monkey/retromusic/adapter/song/AbsOffsetSongAdapter.kt @@ -4,14 +4,14 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.annotation.LayoutRes -import androidx.appcompat.app.AppCompatActivity +import androidx.fragment.app.FragmentActivity import code.name.monkey.retromusic.R import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.interfaces.ICabHolder import code.name.monkey.retromusic.model.Song abstract class AbsOffsetSongAdapter( - activity: AppCompatActivity, + activity: FragmentActivity, dataSet: MutableList, @LayoutRes itemLayoutRes: Int, ICabHolder: ICabHolder? diff --git a/app/src/main/java/code/name/monkey/retromusic/adapter/song/PlayingQueueAdapter.kt b/app/src/main/java/code/name/monkey/retromusic/adapter/song/PlayingQueueAdapter.kt index 2b1b9198..7004909b 100644 --- a/app/src/main/java/code/name/monkey/retromusic/adapter/song/PlayingQueueAdapter.kt +++ b/app/src/main/java/code/name/monkey/retromusic/adapter/song/PlayingQueueAdapter.kt @@ -173,7 +173,7 @@ class PlayingQueueAdapter( } override fun onGetSwipeReactionType(holder: ViewHolder, position: Int, x: Int, y: Int): Int { - return if (onCheckCanStartDrag(holder!!, position, x, y)) { + return if (onCheckCanStartDrag(holder, position, x, y)) { SwipeableItemConstants.REACTION_CAN_NOT_SWIPE_BOTH_H } else { SwipeableItemConstants.REACTION_CAN_SWIPE_BOTH_H diff --git a/app/src/main/java/code/name/monkey/retromusic/adapter/song/PlaylistSongAdapter.kt b/app/src/main/java/code/name/monkey/retromusic/adapter/song/PlaylistSongAdapter.kt index 27f7edec..0153f0e8 100644 --- a/app/src/main/java/code/name/monkey/retromusic/adapter/song/PlaylistSongAdapter.kt +++ b/app/src/main/java/code/name/monkey/retromusic/adapter/song/PlaylistSongAdapter.kt @@ -2,22 +2,21 @@ package code.name.monkey.retromusic.adapter.song import android.view.MenuItem import android.view.View -import androidx.appcompat.app.AppCompatActivity -import androidx.core.os.bundleOf -import androidx.navigation.findNavController -import code.name.monkey.retromusic.EXTRA_ALBUM_ID +import androidx.fragment.app.FragmentActivity import code.name.monkey.retromusic.R -import code.name.monkey.retromusic.helper.MusicPlayerRemote +import code.name.monkey.retromusic.db.PlaylistEntity +import code.name.monkey.retromusic.db.toSongEntity +import code.name.monkey.retromusic.dialogs.RemoveSongFromPlaylistDialog import code.name.monkey.retromusic.interfaces.ICabHolder import code.name.monkey.retromusic.model.Song -import com.google.android.material.button.MaterialButton open class PlaylistSongAdapter( - activity: AppCompatActivity, + private val playlist: PlaylistEntity, + activity: FragmentActivity, dataSet: MutableList, itemLayoutRes: Int, ICabHolder: ICabHolder? -) : AbsOffsetSongAdapter(activity, dataSet, itemLayoutRes, ICabHolder) { +) : SongAdapter(activity, dataSet, itemLayoutRes, ICabHolder) { init { this.setMultiSelectMenuRes(R.menu.menu_cannot_delete_single_songs_playlist_songs_selection) @@ -27,43 +26,21 @@ open class PlaylistSongAdapter( return ViewHolder(view) } - override fun onBindViewHolder(holder: SongAdapter.ViewHolder, position: Int) { - if (holder.itemViewType == OFFSET_ITEM) { - val viewHolder = holder as ViewHolder - viewHolder.playAction?.let { - it.setOnClickListener { - MusicPlayerRemote.openQueue(dataSet, 0, true) - } - } - viewHolder.shuffleAction?.let { - it.setOnClickListener { - MusicPlayerRemote.openAndShuffleQueue(dataSet, true) - } - } - } else { - super.onBindViewHolder(holder, position - 1) - } - } - - open inner class ViewHolder(itemView: View) : AbsOffsetSongAdapter.ViewHolder(itemView) { - - val playAction: MaterialButton? = itemView.findViewById(R.id.playAction) - val shuffleAction: MaterialButton? = itemView.findViewById(R.id.shuffleAction) + open inner class ViewHolder(itemView: View) : SongAdapter.ViewHolder(itemView) { override var songMenuRes: Int - get() = R.menu.menu_item_cannot_delete_single_songs_playlist_song + get() = R.menu.menu_item_playlist_song set(value) { super.songMenuRes = value } override fun onSongMenuItemClick(item: MenuItem): Boolean { - if (item.itemId == R.id.action_go_to_album) { - activity.findNavController(R.id.fragment_container) - .navigate( - R.id.albumDetailsFragment, - bundleOf(EXTRA_ALBUM_ID to song.albumId) - ) - return true + when (item.itemId) { + R.id.action_remove_from_playlist -> { + RemoveSongFromPlaylistDialog.create(song.toSongEntity(playlist.playListId)) + .show(activity.supportFragmentManager, "REMOVE_FROM_PLAYLIST") + return true + } } return super.onSongMenuItemClick(item) } diff --git a/app/src/main/java/code/name/monkey/retromusic/adapter/song/SongAdapter.kt b/app/src/main/java/code/name/monkey/retromusic/adapter/song/SongAdapter.kt index f7707c5a..f5c18a47 100644 --- a/app/src/main/java/code/name/monkey/retromusic/adapter/song/SongAdapter.kt +++ b/app/src/main/java/code/name/monkey/retromusic/adapter/song/SongAdapter.kt @@ -7,6 +7,7 @@ import android.view.MenuItem import android.view.View import android.view.ViewGroup import androidx.core.os.bundleOf +import androidx.core.view.isVisible import androidx.fragment.app.FragmentActivity import androidx.navigation.findNavController import code.name.monkey.retromusic.EXTRA_ALBUM_ID @@ -87,6 +88,7 @@ open class SongAdapter( } holder.title?.text = getSongTitle(song) holder.text?.text = getSongText(song) + holder.text2?.text = getSongText(song) loadAlbumCover(song, holder) } @@ -121,6 +123,10 @@ open class SongAdapter( return song.artistName } + private fun getSongText2(song: Song): String? { + return song.albumName + } + override fun getItemCount(): Int { return dataSet.size } @@ -172,7 +178,7 @@ open class SongAdapter( } protected open fun onSongMenuItemClick(item: MenuItem): Boolean { - if (image != null && image!!.visibility == View.VISIBLE) { + if (image != null && image!!.isVisible) { when (item.itemId) { R.id.action_go_to_album -> { activity.findNavController(R.id.fragment_container) diff --git a/app/src/main/java/code/name/monkey/retromusic/db/SongExtension.kt b/app/src/main/java/code/name/monkey/retromusic/db/SongExtension.kt index 03666f0a..ed1ea3be 100644 --- a/app/src/main/java/code/name/monkey/retromusic/db/SongExtension.kt +++ b/app/src/main/java/code/name/monkey/retromusic/db/SongExtension.kt @@ -2,6 +2,12 @@ package code.name.monkey.retromusic.db import code.name.monkey.retromusic.model.Song +fun List.fromHistoryToSongs(): List { + return map { + it.toSong() + } +} + fun List.toSongs(): List { return map { it.toSong() @@ -131,3 +137,4 @@ fun List.toSongsEntity(playlistEntity: PlaylistEntity): List { it.toSongEntity(playlistEntity.playListId) } } + diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/DetailListFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/DetailListFragment.kt index cd24eac7..40d6bd21 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/DetailListFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/DetailListFragment.kt @@ -4,7 +4,6 @@ import android.os.Bundle import android.view.View import android.widget.ImageView import androidx.core.os.bundleOf -import androidx.lifecycle.Observer import androidx.navigation.fragment.FragmentNavigatorExtras import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.navArgs @@ -23,13 +22,12 @@ import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment import code.name.monkey.retromusic.model.Album import code.name.monkey.retromusic.model.Artist import code.name.monkey.retromusic.state.NowPlayingPanelState +import code.name.monkey.retromusic.util.RetroUtil import kotlinx.android.synthetic.main.fragment_playlist_detail.* -import org.koin.androidx.viewmodel.ext.android.sharedViewModel class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_detail), ArtistClickListener, AlbumClickListener { private val args by navArgs() - private val libraryViewModel by sharedViewModel() override fun onActivityCreated(savedInstanceState: Bundle?) { super.onActivityCreated(savedInstanceState) @@ -55,7 +53,6 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de TOP_PLAYED_PLAYLIST -> topPlayed() } - recyclerView.adapter?.registerAdapterDataObserver(object : AdapterDataObserver() { override fun onChanged() { super.onChanged() @@ -76,7 +73,7 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de adapter = songAdapter layoutManager = linearLayoutManager() } - libraryViewModel.recentSongs().observe(viewLifecycleOwner, Observer { songs -> + libraryViewModel.recentSongs().observe(viewLifecycleOwner, { songs -> songAdapter.swapDataSet(songs) }) } @@ -92,7 +89,7 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de adapter = songAdapter layoutManager = linearLayoutManager() } - libraryViewModel.playCountSongs().observe(viewLifecycleOwner, Observer { songs -> + libraryViewModel.playCountSongs().observe(viewLifecycleOwner, { songs -> songAdapter.swapDataSet(songs) }) } @@ -109,9 +106,8 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de adapter = songAdapter layoutManager = linearLayoutManager() } - libraryViewModel.observableHistorySongs().observe(viewLifecycleOwner, Observer { - val songs = it.map { historyEntity -> historyEntity.toSong() } - songAdapter.swapDataSet(songs) + libraryViewModel.observableHistorySongs().observe(viewLifecycleOwner, { + songAdapter.swapDataSet(it) }) } @@ -170,8 +166,14 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false) private fun gridLayoutManager(): GridLayoutManager = - GridLayoutManager(requireContext(), 2, GridLayoutManager.VERTICAL, false) + GridLayoutManager(requireContext(), gridCount(), GridLayoutManager.VERTICAL, false) + private fun gridCount(): Int { + if (RetroUtil.isTablet()) { + return if (RetroUtil.isLandscape()) 6 else 4 + } + return 2 + } override fun onArtist(artistId: Long, imageView: ImageView) { findNavController().navigate( diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/LibraryViewModel.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/LibraryViewModel.kt index 2109bde0..1fb47763 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/LibraryViewModel.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/LibraryViewModel.kt @@ -11,11 +11,8 @@ import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.interfaces.IMusicServiceEventListener import code.name.monkey.retromusic.model.* import code.name.monkey.retromusic.repository.RealRepository - import code.name.monkey.retromusic.state.NowPlayingPanelState - import code.name.monkey.retromusic.util.PreferenceUtil - import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.launch @@ -39,6 +36,10 @@ class LibraryViewModel( panelState.postValue(state) } + init { + loadLibraryContent() + } + private fun loadLibraryContent() = viewModelScope.launch(IO) { fetchHomeSections() fetchSongs() @@ -51,37 +52,30 @@ class LibraryViewModel( fun getSearchResult(): LiveData> = searchResults fun getSongs(): LiveData> { - fetchSongs() return songs } fun getAlbums(): LiveData> { - fetchAlbums() return albums } fun getArtists(): LiveData> { - fetchArtists() return artists } fun getPlaylists(): LiveData> { - fetchPlaylists() return playlists } fun getLegacyPlaylist(): LiveData> { - fetchLegacyPlaylist() return legacyPlaylists } fun getGenre(): LiveData> { - fetchGenres() return genres } fun getHome(): LiveData> { - fetchHomeSections() return home } @@ -261,10 +255,6 @@ class LibraryViewModel( }) } - fun observableHistorySongs() = repository.observableHistorySongs() - - fun favorites() = repository.favorites() - fun artists(type: Int): LiveData> = liveData { when (type) { TOP_ARTISTS -> emit(repository.topArtists()) @@ -283,12 +273,6 @@ class LibraryViewModel( } } - fun clearSearchResult() { - viewModelScope.launch { - searchResults.postValue(emptyList()) - } - } - fun artist(artistId: Long): LiveData = liveData { emit(repository.artistById(artistId)) } @@ -296,6 +280,16 @@ class LibraryViewModel( fun fetchContributors(): LiveData> = liveData { emit(repository.contributor()) } + + fun observableHistorySongs() = repository.observableHistorySongs() + + fun favorites() = repository.favorites() + + fun clearSearchResult() { + viewModelScope.launch { + searchResults.postValue(emptyList()) + } + } } enum class ReloadType { diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/albums/AlbumDetailsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/albums/AlbumDetailsFragment.kt index 296d8955..1544a6a3 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/albums/AlbumDetailsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/albums/AlbumDetailsFragment.kt @@ -30,7 +30,6 @@ import code.name.monkey.retromusic.dialogs.DeleteSongsDialog import code.name.monkey.retromusic.extensions.applyColor import code.name.monkey.retromusic.extensions.applyOutlineColor import code.name.monkey.retromusic.extensions.show -import code.name.monkey.retromusic.fragments.LibraryViewModel import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment import code.name.monkey.retromusic.glide.AlbumGlideRequest import code.name.monkey.retromusic.glide.ArtistGlideRequest @@ -57,7 +56,6 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import org.koin.android.ext.android.get -import org.koin.androidx.viewmodel.ext.android.sharedViewModel import org.koin.androidx.viewmodel.ext.android.viewModel import org.koin.core.parameter.parametersOf import java.util.* @@ -69,7 +67,6 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det private val detailsViewModel by viewModel { parametersOf(arguments.extraAlbumId) } - private val libraryViewModel by sharedViewModel() private lateinit var simpleSongAdapter: SimpleSongAdapter private lateinit var album: Album diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/artists/ArtistDetailsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/artists/ArtistDetailsFragment.kt index 1caec7e6..b3476552 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/artists/ArtistDetailsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/artists/ArtistDetailsFragment.kt @@ -26,7 +26,6 @@ import code.name.monkey.retromusic.extensions.applyColor import code.name.monkey.retromusic.extensions.applyOutlineColor import code.name.monkey.retromusic.extensions.show import code.name.monkey.retromusic.extensions.showToast -import code.name.monkey.retromusic.fragments.LibraryViewModel import code.name.monkey.retromusic.fragments.albums.AlbumClickListener import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment import code.name.monkey.retromusic.glide.ArtistGlideRequest @@ -47,7 +46,6 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import org.koin.android.ext.android.get -import org.koin.androidx.viewmodel.ext.android.sharedViewModel import org.koin.androidx.viewmodel.ext.android.viewModel import org.koin.core.parameter.parametersOf import java.util.* @@ -59,7 +57,6 @@ class ArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_artist_d private val detailsViewModel: ArtistDetailsViewModel by viewModel { parametersOf(arguments.extraArtistId) } - private val libraryViewModel by sharedViewModel() private lateinit var artist: Artist private lateinit var songAdapter: SimpleSongAdapter private lateinit var albumAdapter: HorizontalAlbumAdapter diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsMainActivityFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsMainActivityFragment.kt index 22e373d5..10b8094d 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsMainActivityFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsMainActivityFragment.kt @@ -8,8 +8,11 @@ import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.appthemehelper.util.VersionUtils import code.name.monkey.retromusic.R import code.name.monkey.retromusic.activities.MainActivity +import code.name.monkey.retromusic.fragments.LibraryViewModel +import org.koin.androidx.viewmodel.ext.android.sharedViewModel abstract class AbsMainActivityFragment(@LayoutRes layout: Int) : AbsMusicServiceFragment(layout) { + val libraryViewModel: LibraryViewModel by sharedViewModel() val mainActivity: MainActivity get() = activity as MainActivity diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsPlayerFragment.kt index 8f067d47..473479d0 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsPlayerFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsPlayerFragment.kt @@ -27,7 +27,6 @@ import code.name.monkey.retromusic.db.toSongEntity import code.name.monkey.retromusic.dialogs.* import code.name.monkey.retromusic.extensions.hide import code.name.monkey.retromusic.extensions.whichFragment -import code.name.monkey.retromusic.fragments.LibraryViewModel import code.name.monkey.retromusic.fragments.ReloadType import code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment import code.name.monkey.retromusic.helper.MusicPlayerRemote @@ -43,14 +42,12 @@ import kotlinx.coroutines.Dispatchers.Main import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import org.koin.android.ext.android.get -import org.koin.androidx.viewmodel.ext.android.sharedViewModel import java.io.FileNotFoundException abstract class AbsPlayerFragment(@LayoutRes layout: Int) : AbsMainActivityFragment(layout), Toolbar.OnMenuItemClickListener, IPaletteColorHolder, PlayerAlbumCoverFragment.Callbacks { private var playerAlbumCoverFragment: PlayerAlbumCoverFragment? = null - protected val libraryViewModel by sharedViewModel() override fun onMenuItemClick( item: MenuItem diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsRecyclerViewFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsRecyclerViewFragment.kt index d7a82b15..c98ac32d 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsRecyclerViewFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsRecyclerViewFragment.kt @@ -13,7 +13,6 @@ import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.retromusic.R import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog import code.name.monkey.retromusic.dialogs.ImportPlaylistDialog -import code.name.monkey.retromusic.fragments.LibraryViewModel import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.state.NowPlayingPanelState import code.name.monkey.retromusic.util.DensityUtil @@ -23,15 +22,12 @@ import com.google.android.material.appbar.AppBarLayout import kotlinx.android.synthetic.main.fragment_main_recycler.* import me.zhanghai.android.fastscroll.FastScroller import me.zhanghai.android.fastscroll.FastScrollerBuilder -import org.koin.androidx.viewmodel.ext.android.sharedViewModel abstract class AbsRecyclerViewFragment, LM : RecyclerView.LayoutManager> : AbsMainActivityFragment(R.layout.fragment_main_recycler), AppBarLayout.OnOffsetChangedListener { - val libraryViewModel: LibraryViewModel by sharedViewModel() - override fun onActivityCreated(savedInstanceState: Bundle?) { super.onActivityCreated(savedInstanceState) setHasOptionsMenu(true) diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/folder/FoldersFragment.java b/app/src/main/java/code/name/monkey/retromusic/fragments/folder/FoldersFragment.java index ad0a4b7a..43cd9ae5 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/folder/FoldersFragment.java +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/folder/FoldersFragment.java @@ -75,6 +75,7 @@ import code.name.monkey.retromusic.misc.DialogAsyncTask; import code.name.monkey.retromusic.misc.UpdateToastMediaScannerCompletionListener; import code.name.monkey.retromusic.misc.WrappedAsyncTaskLoader; import code.name.monkey.retromusic.model.Song; +import code.name.monkey.retromusic.state.NowPlayingPanelState; import code.name.monkey.retromusic.util.DensityUtil; import code.name.monkey.retromusic.util.FileUtil; import code.name.monkey.retromusic.util.PreferenceUtil; @@ -163,6 +164,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { + getLibraryViewModel().setPanelState(NowPlayingPanelState.COLLAPSED_WITH); getMainActivity().setSupportActionBar(toolbar); getMainActivity().getSupportActionBar().setTitle(null); setStatusBarColorAuto(view); diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/genres/GenreDetailsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/genres/GenreDetailsFragment.kt index 8a5f7d52..cca506d1 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/genres/GenreDetailsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/genres/GenreDetailsFragment.kt @@ -12,14 +12,12 @@ import androidx.recyclerview.widget.RecyclerView import code.name.monkey.retromusic.R import code.name.monkey.retromusic.adapter.song.SongAdapter import code.name.monkey.retromusic.extensions.dipToPix -import code.name.monkey.retromusic.fragments.LibraryViewModel import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment import code.name.monkey.retromusic.helper.menu.GenreMenuHelper import code.name.monkey.retromusic.model.Genre import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.state.NowPlayingPanelState import kotlinx.android.synthetic.main.fragment_playlist_detail.* -import org.koin.androidx.viewmodel.ext.android.sharedViewModel import org.koin.androidx.viewmodel.ext.android.viewModel import org.koin.core.parameter.parametersOf import java.util.* @@ -29,7 +27,6 @@ class GenreDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playlist_ private val detailsViewModel: GenreDetailsViewModel by viewModel { parametersOf(arguments.extraGenre) } - private val libraryViewModel by sharedViewModel() private lateinit var genre: Genre private lateinit var songAdapter: SongAdapter diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/home/HomeFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/home/HomeFragment.kt index 905c30e4..48c7f42c 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/home/HomeFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/home/HomeFragment.kt @@ -37,24 +37,23 @@ import code.name.monkey.retromusic.adapter.HomeAdapter import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog import code.name.monkey.retromusic.dialogs.ImportPlaylistDialog import code.name.monkey.retromusic.extensions.findActivityNavController -import code.name.monkey.retromusic.fragments.LibraryViewModel import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment import code.name.monkey.retromusic.glide.ProfileBannerGlideRequest import code.name.monkey.retromusic.glide.UserProfileGlideRequest +import code.name.monkey.retromusic.state.NowPlayingPanelState import code.name.monkey.retromusic.util.NavigationUtil import code.name.monkey.retromusic.util.PreferenceUtil import com.bumptech.glide.Glide import kotlinx.android.synthetic.main.abs_playlists.* import kotlinx.android.synthetic.main.fragment_banner_home.* import kotlinx.android.synthetic.main.home_content.* -import org.koin.androidx.viewmodel.ext.android.sharedViewModel class HomeFragment : AbsMainActivityFragment(if (PreferenceUtil.isHomeBanner) R.layout.fragment_banner_home else R.layout.fragment_home) { - private val libraryViewModel: LibraryViewModel by sharedViewModel() override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + libraryViewModel.setPanelState(NowPlayingPanelState.COLLAPSED_WITH) mainActivity.setSupportActionBar(toolbar) mainActivity.supportActionBar?.title = null setStatusBarColorAuto(view) diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/library/LibraryFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/library/LibraryFragment.kt index 10a1630e..3e5d579b 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/library/LibraryFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/library/LibraryFragment.kt @@ -15,18 +15,14 @@ import code.name.monkey.retromusic.R import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog import code.name.monkey.retromusic.dialogs.ImportPlaylistDialog import code.name.monkey.retromusic.extensions.whichFragment -import code.name.monkey.retromusic.fragments.LibraryViewModel import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment import code.name.monkey.retromusic.model.CategoryInfo import code.name.monkey.retromusic.state.NowPlayingPanelState import code.name.monkey.retromusic.util.PreferenceUtil import kotlinx.android.synthetic.main.fragment_library.* -import org.koin.androidx.viewmodel.ext.android.sharedViewModel class LibraryFragment : AbsMainActivityFragment(R.layout.fragment_library) { - private val libraryViewModel by sharedViewModel() - override fun onActivityCreated(savedInstanceState: Bundle?) { super.onActivityCreated(savedInstanceState) setHasOptionsMenu(true) diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/playlists/PlaylistDetailsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/playlists/PlaylistDetailsFragment.kt index 641cab49..6637984b 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/playlists/PlaylistDetailsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/playlists/PlaylistDetailsFragment.kt @@ -5,26 +5,20 @@ import android.view.Menu import android.view.MenuInflater import android.view.MenuItem import android.view.View +import androidx.core.view.isVisible import androidx.navigation.fragment.navArgs import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import code.name.monkey.retromusic.R -import code.name.monkey.retromusic.adapter.song.OrderablePlaylistSongAdapter -import code.name.monkey.retromusic.adapter.song.SongAdapter +import code.name.monkey.retromusic.adapter.song.PlaylistSongAdapter import code.name.monkey.retromusic.db.PlaylistWithSongs import code.name.monkey.retromusic.db.toSongs import code.name.monkey.retromusic.extensions.dipToPix -import code.name.monkey.retromusic.fragments.LibraryViewModel import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.state.NowPlayingPanelState -import code.name.monkey.retromusic.util.PlaylistsUtil -import com.h6ah4i.android.widget.advrecyclerview.animator.RefactoredDefaultItemAnimator -import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager -import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils import kotlinx.android.synthetic.main.fragment_playlist_detail.* -import org.koin.androidx.viewmodel.ext.android.sharedViewModel import org.koin.androidx.viewmodel.ext.android.viewModel import org.koin.core.parameter.parametersOf @@ -33,12 +27,9 @@ class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playli private val viewModel: PlaylistDetailsViewModel by viewModel { parametersOf(arguments.extraPlaylist) } - private val libraryViewModel by sharedViewModel() - private lateinit var playlist: PlaylistWithSongs - private lateinit var adapter: SongAdapter - private var wrappedAdapter: RecyclerView.Adapter<*>? = null - private var recyclerViewDragDropManager: RecyclerViewDragDropManager? = null + private lateinit var playlist: PlaylistWithSongs + private lateinit var playlistSongAdapter: PlaylistSongAdapter override fun onActivityCreated(savedInstanceState: Bundle?) { super.onActivityCreated(savedInstanceState) @@ -58,39 +49,19 @@ class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playli } private fun setUpRecyclerView() { - recyclerView.layoutManager = LinearLayoutManager(requireContext()) - recyclerViewDragDropManager = RecyclerViewDragDropManager() - val animator = RefactoredDefaultItemAnimator() - adapter = - OrderablePlaylistSongAdapter( - playlist.playlistEntity, - requireActivity(), - ArrayList(), - R.layout.item_list, - null, - object : OrderablePlaylistSongAdapter.OnMoveItemListener { - override fun onMoveItem(fromPosition: Int, toPosition: Int) { - if (PlaylistsUtil.moveItem( - requireContext(), - playlist.playlistEntity.playListId, - fromPosition, - toPosition - ) - ) { - val song = adapter.dataSet.removeAt(fromPosition) - adapter.dataSet.add(toPosition, song) - adapter.notifyItemMoved(fromPosition, toPosition) - } - } - }) - wrappedAdapter = recyclerViewDragDropManager!!.createWrappedAdapter(adapter) - - recyclerView.adapter = wrappedAdapter - recyclerView.itemAnimator = animator - - recyclerViewDragDropManager?.attachRecyclerView(recyclerView) - - adapter.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() { + playlistSongAdapter = PlaylistSongAdapter( + playlist.playlistEntity, + requireActivity(), + ArrayList(), + R.layout.item_list, + null, + ) + recyclerView.apply { + layoutManager = LinearLayoutManager(requireContext()) + adapter = playlistSongAdapter + } + playlistSongAdapter.registerAdapterDataObserver(object : + RecyclerView.AdapterDataObserver() { override fun onChanged() { super.onChanged() checkIsEmpty() @@ -100,10 +71,7 @@ class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playli override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { super.onCreateOptionsMenu(menu, inflater) - val menuRes =/* if (playlist is AbsCustomPlaylist) - R.menu.menu_smart_playlist_detail - else*/ R.menu.menu_playlist_detail - inflater.inflate(menuRes, menu) + inflater.inflate(R.menu.menu_playlist_detail, menu) } override fun onOptionsItemSelected(item: MenuItem): Boolean { @@ -117,32 +85,14 @@ class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playli private fun checkIsEmpty() { checkForPadding() - empty.visibility = if (adapter.itemCount == 0) View.VISIBLE else View.GONE - emptyText.visibility = if (adapter.itemCount == 0) View.VISIBLE else View.GONE + empty.isVisible = playlistSongAdapter.itemCount == 0 + emptyText.isVisible = playlistSongAdapter.itemCount == 0 } - override fun onPause() { - if (recyclerViewDragDropManager != null) { - recyclerViewDragDropManager!!.cancelDrag() - } - super.onPause() - } override fun onDestroy() { - if (recyclerViewDragDropManager != null) { - recyclerViewDragDropManager!!.release() - recyclerViewDragDropManager = null - } - - if (recyclerView != null) { - recyclerView!!.itemAnimator = null - recyclerView!!.adapter = null - } - - if (wrappedAdapter != null) { - WrapperAdapterUtils.releaseAll(wrappedAdapter) - wrappedAdapter = null - } + recyclerView?.itemAnimator = null + recyclerView?.adapter = null super.onDestroy() } @@ -154,7 +104,7 @@ class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playli fun songs(songs: List) { progressIndicator.hide() if (songs.isNotEmpty()) { - adapter.swapDataSet(songs) + playlistSongAdapter.swapDataSet(songs) } else { showEmptyView() } diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/search/SearchFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/search/SearchFragment.kt index f2dd37a3..3f5f9f06 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/search/SearchFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/search/SearchFragment.kt @@ -20,12 +20,10 @@ import code.name.monkey.retromusic.adapter.SearchAdapter import code.name.monkey.retromusic.extensions.accentColor import code.name.monkey.retromusic.extensions.dipToPix import code.name.monkey.retromusic.extensions.showToast -import code.name.monkey.retromusic.fragments.LibraryViewModel import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment import code.name.monkey.retromusic.state.NowPlayingPanelState import com.google.android.material.textfield.TextInputEditText import kotlinx.android.synthetic.main.fragment_search.* -import org.koin.androidx.viewmodel.ext.android.sharedViewModel import java.util.* import kotlin.collections.ArrayList @@ -35,7 +33,6 @@ class SearchFragment : AbsMainActivityFragment(R.layout.fragment_search), TextWa const val REQ_CODE_SPEECH_INPUT = 9001 } - private val libraryViewModel by sharedViewModel() private lateinit var searchAdapter: SearchAdapter private var query: String? = null diff --git a/app/src/main/java/code/name/monkey/retromusic/model/PlaylistSong.kt b/app/src/main/java/code/name/monkey/retromusic/model/PlaylistSong.kt index 8b7cbc00..d972e318 100644 --- a/app/src/main/java/code/name/monkey/retromusic/model/PlaylistSong.kt +++ b/app/src/main/java/code/name/monkey/retromusic/model/PlaylistSong.kt @@ -33,7 +33,7 @@ class PlaylistSong( override val artistName: String, val playlistId: Long, val idInPlayList: Long, - override val composer: String, + override val composer: String?, override val albumArtist: String? ) : Song( id = id, diff --git a/app/src/main/java/code/name/monkey/retromusic/repository/PlaylistSongsLoader.kt b/app/src/main/java/code/name/monkey/retromusic/repository/PlaylistSongsLoader.kt index fa24d931..80f0829a 100644 --- a/app/src/main/java/code/name/monkey/retromusic/repository/PlaylistSongsLoader.kt +++ b/app/src/main/java/code/name/monkey/retromusic/repository/PlaylistSongsLoader.kt @@ -16,9 +16,8 @@ package code.name.monkey.retromusic.repository import android.content.Context import android.database.Cursor -import android.provider.MediaStore import android.provider.MediaStore.Audio.AudioColumns -import android.provider.MediaStore.Audio.Playlists.* +import android.provider.MediaStore.Audio.Playlists.Members import code.name.monkey.retromusic.Constants.IS_MUSIC import code.name.monkey.retromusic.extensions.getInt import code.name.monkey.retromusic.extensions.getLong @@ -83,7 +82,7 @@ object PlaylistSongsLoader { val artistId = cursor.getLong(AudioColumns.ARTIST_ID) val artistName = cursor.getString(AudioColumns.ARTIST) val idInPlaylist = cursor.getLong(Members._ID) - val composer = cursor.getString(AudioColumns.COMPOSER) + val composer = cursor.getStringOrNull(AudioColumns.COMPOSER) val albumArtist = cursor.getStringOrNull("album_artist") return PlaylistSong( id, diff --git a/app/src/main/java/code/name/monkey/retromusic/repository/Repository.kt b/app/src/main/java/code/name/monkey/retromusic/repository/Repository.kt index 2bf9c67f..476dac74 100644 --- a/app/src/main/java/code/name/monkey/retromusic/repository/Repository.kt +++ b/app/src/main/java/code/name/monkey/retromusic/repository/Repository.kt @@ -16,6 +16,7 @@ package code.name.monkey.retromusic.repository import android.content.Context import androidx.lifecycle.LiveData +import androidx.lifecycle.Transformations import code.name.monkey.retromusic.* import code.name.monkey.retromusic.db.* import code.name.monkey.retromusic.model.* @@ -39,7 +40,7 @@ interface Repository { fun genresFlow(): Flow>> fun historySong(): List fun favorites(): LiveData> - fun observableHistorySongs(): LiveData> + fun observableHistorySongs(): LiveData> fun albumById(albumId: Long): Album fun playlistSongs(playlistEntity: PlaylistEntity): LiveData> suspend fun fetchAlbums(): List @@ -97,6 +98,9 @@ interface Repository { suspend fun blackListPaths(): List suspend fun deleteSongs(songs: List) suspend fun contributor(): List + suspend fun searchArtists(query: String): List + suspend fun searchSongs(query: String): List + suspend fun searchAlbums(query: String): List } class RealRepository( @@ -115,11 +119,17 @@ class RealRepository( ) : Repository { - override suspend fun deleteSongs(songs: List) = roomRepository.deleteSongs(songs) override suspend fun contributor(): List = localDataRepository.contributors() + override suspend fun searchSongs(query: String): List = songRepository.songs(query) + + override suspend fun searchAlbums(query: String): List = albumRepository.albums(query) + + override suspend fun searchArtists(query: String): List = + artistRepository.artists(query) + override suspend fun fetchAlbums(): List = albumRepository.albums() override suspend fun albumByIdAsync(albumId: Long): Album = albumRepository.album(albumId) @@ -311,8 +321,10 @@ class RealRepository( override suspend fun blackListPaths(): List = roomRepository.blackListPaths() - override fun observableHistorySongs(): LiveData> = - roomRepository.observableHistorySongs() + override fun observableHistorySongs(): LiveData> = + Transformations.map(roomRepository.observableHistorySongs()) { + it.fromHistoryToSongs() + } override fun historySong(): List = roomRepository.historySongs() diff --git a/app/src/main/java/code/name/monkey/retromusic/repository/SearchRepository.kt b/app/src/main/java/code/name/monkey/retromusic/repository/SearchRepository.kt index 3aa55242..555ead5e 100644 --- a/app/src/main/java/code/name/monkey/retromusic/repository/SearchRepository.kt +++ b/app/src/main/java/code/name/monkey/retromusic/repository/SearchRepository.kt @@ -22,11 +22,11 @@ import java.util.* class RealSearchRepository( private val songRepository: SongRepository, private val albumRepository: AlbumRepository, - private val artistRepository: RealArtistRepository, + private val artistRepository: ArtistRepository, + private val roomRepository: RoomRepository, private val genreRepository: GenreRepository, - private val playlistRepository: PlaylistRepository ) { - fun searchAll(context: Context, query: String?): MutableList { + suspend fun searchAll(context: Context, query: String?): MutableList { val results = mutableListOf() query?.let { searchString -> val songs = songRepository.songs(searchString) @@ -53,8 +53,8 @@ class RealSearchRepository( results.add(context.resources.getString(R.string.genres)) results.addAll(genres) } - val playlist = playlistRepository.playlists().filter { playlist -> - playlist.name.toLowerCase(Locale.getDefault()) + val playlist = roomRepository.playlistWithSongs().filter { playlist -> + playlist.playlistEntity.playlistName.toLowerCase(Locale.getDefault()) .contains(searchString.toLowerCase(Locale.getDefault())) } if (playlist.isNotEmpty()) { diff --git a/app/src/main/res/layout-land/fragment_banner_home.xml b/app/src/main/res/layout-land/fragment_banner_home.xml index 83422bb3..0b13fab3 100644 --- a/app/src/main/res/layout-land/fragment_banner_home.xml +++ b/app/src/main/res/layout-land/fragment_banner_home.xml @@ -11,10 +11,50 @@ ~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ~ See the GNU General Public License for more details. --> - - + + + + + + + + + + + + + + + - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_home.xml b/app/src/main/res/layout-land/fragment_home.xml index a2e570c3..a26bf9e5 100644 --- a/app/src/main/res/layout-land/fragment_home.xml +++ b/app/src/main/res/layout-land/fragment_home.xml @@ -11,68 +11,109 @@ ~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ~ See the GNU General Public License for more details. --> - - + android:layout_height="match_parent"> - + android:layout_height="wrap_content" + app:liftOnScroll="true"> - - - + app:layout_scrollFlags="scroll|enterAlways"> - + - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-sw600dp/activity_playing_queue.xml b/app/src/main/res/layout-sw600dp/activity_playing_queue.xml new file mode 100644 index 00000000..a0da4e0f --- /dev/null +++ b/app/src/main/res/layout-sw600dp/activity_playing_queue.xml @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-sw600dp/item_list.xml b/app/src/main/res/layout-sw600dp/item_list.xml new file mode 100644 index 00000000..7a5f59b1 --- /dev/null +++ b/app/src/main/res/layout-sw600dp/item_list.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-sw600dp/item_list_no_image.xml b/app/src/main/res/layout-sw600dp/item_list_no_image.xml new file mode 100644 index 00000000..dfcbafa8 --- /dev/null +++ b/app/src/main/res/layout-sw600dp/item_list_no_image.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-sw600dp/item_queue.xml b/app/src/main/res/layout-sw600dp/item_queue.xml new file mode 100644 index 00000000..20c4531e --- /dev/null +++ b/app/src/main/res/layout-sw600dp/item_queue.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_playing_queue.xml b/app/src/main/res/layout/activity_playing_queue.xml index cbc1378d..4dcdf70f 100755 --- a/app/src/main/res/layout/activity_playing_queue.xml +++ b/app/src/main/res/layout/activity_playing_queue.xml @@ -37,15 +37,79 @@ - + android:layout_height="wrap_content" + app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"> + + + + + + + + + + + + + + + - \ No newline at end of file diff --git a/app/src/main/res/layout/item_list.xml b/app/src/main/res/layout/item_list.xml index fac82e1e..aefd963b 100755 --- a/app/src/main/res/layout/item_list.xml +++ b/app/src/main/res/layout/item_list.xml @@ -1,5 +1,5 @@ - + tools:ignore="ContentDescription" + tools:visibility="visible" /> - - - - - - - - - - - + android:layout_marginStart="16dp" + app:cardCornerRadius="6dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/drag_view" + app:layout_constraintTop_toTopOf="parent"> + + + android:minHeight="40dp" + android:textAppearance="@style/TextViewSubtitle2" + android:visibility="gone" + tools:text="100" + tools:visibility="visible" /> + - - + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/item_list_no_image.xml b/app/src/main/res/layout/item_list_no_image.xml index bf6ffc26..6331125d 100644 --- a/app/src/main/res/layout/item_list_no_image.xml +++ b/app/src/main/res/layout/item_list_no_image.xml @@ -32,7 +32,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - tools:text="@tools:sample/first_names" /> + tools:text="@tools:sample/full_names" /> - + tools:text="@tools:sample/full_names" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_queue.xml b/app/src/main/res/layout/item_queue.xml index 1ac4b428..33082b0c 100644 --- a/app/src/main/res/layout/item_queue.xml +++ b/app/src/main/res/layout/item_queue.xml @@ -13,11 +13,16 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - @@ -26,71 +31,86 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="center_vertical|start" - android:padding="8dp" android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" app:srcCompat="@drawable/ic_drag_vertical" app:tint="?attr/colorControlNormal" tools:ignore="ContentDescription" tools:visibility="visible" /> + + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:layout_marginStart="16dp" + app:cardCornerRadius="6dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/drag_view" + app:layout_constraintTop_toTopOf="parent"> + - - + android:ellipsize="end" + android:maxLines="1" + android:paddingHorizontal="16dp" + android:textAppearance="@style/TextViewSubtitle1" + android:textColor="?android:attr/textColorPrimary" + app:layout_constraintBottom_toTopOf="@+id/text" + app:layout_constraintEnd_toStartOf="@id/menu" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@id/imageContainer" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_chainStyle="packed" + tools:text="@tools:sample/full_names" /> - - - - + - + \ No newline at end of file diff --git a/app/src/main/res/layout/sub_header.xml b/app/src/main/res/layout/sub_header.xml index 5a638f25..5b066f07 100644 --- a/app/src/main/res/layout/sub_header.xml +++ b/app/src/main/res/layout/sub_header.xml @@ -6,7 +6,8 @@ android:layout_height="wrap_content" android:layout_gravity="start" android:gravity="start" - android:paddingHorizontal="16dp" + android:layout_marginStart="@dimen/toolbar_margin_horizontal" + android:layout_marginEnd="@dimen/toolbar_margin_horizontal" android:paddingVertical="12dp" android:textAppearance="@style/TextViewOverline" android:textStyle="bold" diff --git a/app/src/main/res/master/values-af-rZA/strings.xml b/app/src/main/res/master/values-af-rZA/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-af-rZA/strings.xml +++ b/app/src/main/res/master/values-af-rZA/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-bn-rIN/strings.xml b/app/src/main/res/master/values-bn-rIN/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-bn-rIN/strings.xml +++ b/app/src/main/res/master/values-bn-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-ca-rES/strings.xml b/app/src/main/res/master/values-ca-rES/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-ca-rES/strings.xml +++ b/app/src/main/res/master/values-ca-rES/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-da-rDK/strings.xml b/app/src/main/res/master/values-da-rDK/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-da-rDK/strings.xml +++ b/app/src/main/res/master/values-da-rDK/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-en-rUS/strings.xml b/app/src/main/res/master/values-en-rUS/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-en-rUS/strings.xml +++ b/app/src/main/res/master/values-en-rUS/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-fa-rIR/strings.xml b/app/src/main/res/master/values-fa-rIR/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-fa-rIR/strings.xml +++ b/app/src/main/res/master/values-fa-rIR/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-fi-rFI/strings.xml b/app/src/main/res/master/values-fi-rFI/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-fi-rFI/strings.xml +++ b/app/src/main/res/master/values-fi-rFI/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-hi-rIN/strings.xml b/app/src/main/res/master/values-hi-rIN/strings.xml index 56dbeb11..d9822f7a 100644 --- a/app/src/main/res/master/values-hi-rIN/strings.xml +++ b/app/src/main/res/master/values-hi-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-iw-rIL/strings.xml b/app/src/main/res/master/values-iw-rIL/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-iw-rIL/strings.xml +++ b/app/src/main/res/master/values-iw-rIL/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-kn-rIN/strings.xml b/app/src/main/res/master/values-kn-rIN/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-kn-rIN/strings.xml +++ b/app/src/main/res/master/values-kn-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-ml-rIN/strings.xml b/app/src/main/res/master/values-ml-rIN/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-ml-rIN/strings.xml +++ b/app/src/main/res/master/values-ml-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-ne-rIN/strings.xml b/app/src/main/res/master/values-ne-rIN/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-ne-rIN/strings.xml +++ b/app/src/main/res/master/values-ne-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-no-rNO/strings.xml b/app/src/main/res/master/values-no-rNO/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-no-rNO/strings.xml +++ b/app/src/main/res/master/values-no-rNO/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-or-rIN/strings.xml b/app/src/main/res/master/values-or-rIN/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-or-rIN/strings.xml +++ b/app/src/main/res/master/values-or-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-pt-rPT/strings.xml b/app/src/main/res/master/values-pt-rPT/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-pt-rPT/strings.xml +++ b/app/src/main/res/master/values-pt-rPT/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-sk-rSK/strings.xml b/app/src/main/res/master/values-sk-rSK/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-sk-rSK/strings.xml +++ b/app/src/main/res/master/values-sk-rSK/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-sv-rSE/strings.xml b/app/src/main/res/master/values-sv-rSE/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-sv-rSE/strings.xml +++ b/app/src/main/res/master/values-sv-rSE/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-ta-rIN/strings.xml b/app/src/main/res/master/values-ta-rIN/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-ta-rIN/strings.xml +++ b/app/src/main/res/master/values-ta-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/master/values-ur-rIN/strings.xml b/app/src/main/res/master/values-ur-rIN/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/master/values-ur-rIN/strings.xml +++ b/app/src/main/res/master/values-ur-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-af-rZA/strings.xml b/app/src/main/res/values-af-rZA/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-af-rZA/strings.xml +++ b/app/src/main/res/values-af-rZA/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-bn-rIN/strings.xml b/app/src/main/res/values-bn-rIN/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-bn-rIN/strings.xml +++ b/app/src/main/res/values-bn-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-ca-rES/strings.xml b/app/src/main/res/values-ca-rES/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-ca-rES/strings.xml +++ b/app/src/main/res/values-ca-rES/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-da-rDK/strings.xml b/app/src/main/res/values-da-rDK/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-da-rDK/strings.xml +++ b/app/src/main/res/values-da-rDK/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-en-rHK/strings.xml b/app/src/main/res/values-en-rHK/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/values-en-rHK/strings.xml +++ b/app/src/main/res/values-en-rHK/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-en-rID/strings.xml b/app/src/main/res/values-en-rID/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/values-en-rID/strings.xml +++ b/app/src/main/res/values-en-rID/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-en-rIN/strings.xml b/app/src/main/res/values-en-rIN/strings.xml index 1bb735e3..e028f27c 100644 --- a/app/src/main/res/values-en-rIN/strings.xml +++ b/app/src/main/res/values-en-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-en-rUS/strings.xml b/app/src/main/res/values-en-rUS/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-en-rUS/strings.xml +++ b/app/src/main/res/values-en-rUS/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-fa-rIR/strings.xml b/app/src/main/res/values-fa-rIR/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-fa-rIR/strings.xml +++ b/app/src/main/res/values-fa-rIR/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-fi-rFI/strings.xml b/app/src/main/res/values-fi-rFI/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-fi-rFI/strings.xml +++ b/app/src/main/res/values-fi-rFI/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index c1622e83..d5551022 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-iw-rIL/strings.xml b/app/src/main/res/values-iw-rIL/strings.xml index c432a0a5..fa0ac4a3 100644 --- a/app/src/main/res/values-iw-rIL/strings.xml +++ b/app/src/main/res/values-iw-rIL/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-kn-rIN/strings.xml b/app/src/main/res/values-kn-rIN/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-kn-rIN/strings.xml +++ b/app/src/main/res/values-kn-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-ml-rIN/strings.xml b/app/src/main/res/values-ml-rIN/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-ml-rIN/strings.xml +++ b/app/src/main/res/values-ml-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-ne-rIN/strings.xml b/app/src/main/res/values-ne-rIN/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-ne-rIN/strings.xml +++ b/app/src/main/res/values-ne-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-no-rNO/strings.xml b/app/src/main/res/values-no-rNO/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-no-rNO/strings.xml +++ b/app/src/main/res/values-no-rNO/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-or-rIN/strings.xml b/app/src/main/res/values-or-rIN/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-or-rIN/strings.xml +++ b/app/src/main/res/values-or-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-sk-rSK/strings.xml b/app/src/main/res/values-sk-rSK/strings.xml index ed335f51..e14f5f04 100644 --- a/app/src/main/res/values-sk-rSK/strings.xml +++ b/app/src/main/res/values-sk-rSK/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-ta-rIN/strings.xml b/app/src/main/res/values-ta-rIN/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-ta-rIN/strings.xml +++ b/app/src/main/res/values-ta-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values-ur-rIN/strings.xml b/app/src/main/res/values-ur-rIN/strings.xml index d2b1c3ba..c4438228 100644 --- a/app/src/main/res/values-ur-rIN/strings.xml +++ b/app/src/main/res/values-ur-rIN/strings.xml @@ -370,7 +370,7 @@ Profile Purchase *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app Love this app? Let us know in the Google Play Store how we can make it even better Recent albums diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c7276253..7bb2c04d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -604,7 +604,7 @@ *Think before buying, don\'t ask for refund. - Queue + Playing Queue Rate the app