From bfe03a2b0667824591c7ef864c15061c83537afa Mon Sep 17 00:00:00 2001 From: Hemanth S Date: Sat, 28 Nov 2020 14:33:54 +0530 Subject: [PATCH] Adding shuffle button --- .../fragments/albums/AlbumDetailsFragment.kt | 13 ------------- .../retromusic/fragments/songs/SongsFragment.kt | 8 ++++---- 2 files changed, 4 insertions(+), 17 deletions(-) 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 3f351fe8..cb06d353 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 @@ -31,7 +31,6 @@ import androidx.recyclerview.widget.DefaultItemAnimator import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.LinearLayoutManager import code.name.monkey.appthemehelper.common.ATHToolbarActivity.getToolbarBackgroundColor -import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.retromusic.EXTRA_ALBUM_ID import code.name.monkey.retromusic.EXTRA_ARTIST_ID @@ -64,7 +63,6 @@ import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.RetroUtil import code.name.monkey.retromusic.util.color.MediaNotificationProcessor import com.bumptech.glide.Glide -import com.google.android.material.transition.MaterialContainerTransform import kotlinx.android.synthetic.main.fragment_album_content.* import kotlinx.android.synthetic.main.fragment_album_details.* import kotlinx.coroutines.Dispatchers @@ -89,17 +87,6 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det private val savedSortOrder: String get() = PreferenceUtil.albumDetailSongSortOrder - private fun setUpTransitions() { - val transform = MaterialContainerTransform() - transform.setAllContainerColors(ATHUtil.resolveColor(requireContext(), R.attr.colorSurface)) - sharedElementEnterTransition = transform - } - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setUpTransitions() - } - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) setHasOptionsMenu(true) diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/songs/SongsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/songs/SongsFragment.kt index 8ba0b0e8..c9f79141 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/songs/SongsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/songs/SongsFragment.kt @@ -20,6 +20,7 @@ import androidx.annotation.LayoutRes import androidx.lifecycle.Observer import androidx.recyclerview.widget.GridLayoutManager import code.name.monkey.retromusic.R +import code.name.monkey.retromusic.adapter.song.ShuffleButtonSongAdapter import code.name.monkey.retromusic.adapter.song.SongAdapter import code.name.monkey.retromusic.extensions.surfaceColor import code.name.monkey.retromusic.fragments.ReloadType @@ -35,7 +36,7 @@ class SongsFragment : AbsRecyclerViewCustomGridSizeFragment gridSizeMenu.findItem(R.id.action_grid_size_1).isChecked = - true + 1 -> gridSizeMenu.findItem(R.id.action_grid_size_1).isChecked = true 2 -> gridSizeMenu.findItem(R.id.action_grid_size_2).isChecked = true 3 -> gridSizeMenu.findItem(R.id.action_grid_size_3).isChecked = true 4 -> gridSizeMenu.findItem(R.id.action_grid_size_4).isChecked = true