diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt index 669e8fa8..ca4aa7f0 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt @@ -20,6 +20,7 @@ import code.name.monkey.retromusic.fragments.player.adaptive.AdaptiveFragment import code.name.monkey.retromusic.fragments.player.blur.BlurPlayerFragment import code.name.monkey.retromusic.fragments.player.card.CardFragment import code.name.monkey.retromusic.fragments.player.cardblur.CardBlurFragment +import code.name.monkey.retromusic.fragments.player.classic.ClassicPlayerFragment import code.name.monkey.retromusic.fragments.player.color.ColorFragment import code.name.monkey.retromusic.fragments.player.fit.FitFragment import code.name.monkey.retromusic.fragments.player.flat.FlatPlayerFragment @@ -28,6 +29,7 @@ import code.name.monkey.retromusic.fragments.player.material.MaterialFragment import code.name.monkey.retromusic.fragments.player.normal.PlayerFragment import code.name.monkey.retromusic.fragments.player.plain.PlainPlayerFragment import code.name.monkey.retromusic.fragments.player.simple.SimplePlayerFragment +import code.name.monkey.retromusic.fragments.player.slide.SlidePlayerFragment import code.name.monkey.retromusic.fragments.player.tiny.TinyPlayerFragment import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.views.BottomNavigationBarTinted @@ -194,7 +196,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding MATERIAL -> MaterialFragment() COLOR -> ColorFragment() TINY -> TinyPlayerFragment() - //SLIDE -> SlidePlayerFragment() + CLASSIC -> ClassicPlayerFragment() else -> PlayerFragment() } // must implement AbsPlayerFragment supportFragmentManager.beginTransaction().replace(R.id.playerFragmentContainer, fragment).commit() diff --git a/app/src/main/java/code/name/monkey/retromusic/adapter/album/AlbumCoverPagerAdapter.kt b/app/src/main/java/code/name/monkey/retromusic/adapter/album/AlbumCoverPagerAdapter.kt index 5015db01..c28fcdb9 100644 --- a/app/src/main/java/code/name/monkey/retromusic/adapter/album/AlbumCoverPagerAdapter.kt +++ b/app/src/main/java/code/name/monkey/retromusic/adapter/album/AlbumCoverPagerAdapter.kt @@ -10,13 +10,14 @@ import android.widget.ImageView import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager import code.name.monkey.retromusic.R +import code.name.monkey.retromusic.activities.LyricsActivity +import code.name.monkey.retromusic.fragments.AlbumCoverStyle +import code.name.monkey.retromusic.fragments.NowPlayingScreen import code.name.monkey.retromusic.glide.GlideApp import code.name.monkey.retromusic.glide.RetroGlideExtension import code.name.monkey.retromusic.glide.RetroMusicColoredTarget import code.name.monkey.retromusic.misc.CustomFragmentStatePagerAdapter import code.name.monkey.retromusic.model.Song -import code.name.monkey.retromusic.activities.LyricsActivity -import code.name.monkey.retromusic.fragments.AlbumCoverStyle import code.name.monkey.retromusic.util.PreferenceUtil import java.util.* @@ -90,8 +91,11 @@ class AlbumCoverPagerAdapter(fm: FragmentManager, private val dataSet: ArrayList } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { - val layout = layout - val view = inflater.inflate(layout, container, false) + var finalLayout = layout + if (PreferenceUtil.getInstance().nowPlayingScreen == NowPlayingScreen.CLASSIC) { + finalLayout = R.layout.fragment_album_full_cover + } + val view = inflater.inflate(finalLayout, container, false) albumCover = view.findViewById(R.id.player_image) albumCover.setOnClickListener { startActivity(Intent(context, LyricsActivity::class.java)) } return view diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/NowPlayingScreen.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/NowPlayingScreen.kt index e3a61c7e..228ddb58 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/NowPlayingScreen.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/NowPlayingScreen.kt @@ -22,6 +22,7 @@ enum class NowPlayingScreen constructor(@param:StringRes @field:StringRes PLAIN(R.string.plain, R.drawable.np_plain, 3), TINY(R.string.tiny, R.drawable.np_tiny, 7), SIMPLE(R.string.simple, R.drawable.np_simple, 8), + CLASSIC(R.string.classic, R.drawable.np_normal, 13); //SLIDE(R.string.slide, R.drawable.np_slide, 13) } diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerPlaybackControlsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerPlaybackControlsFragment.kt index bddaa282..e2aff8c9 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerPlaybackControlsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerPlaybackControlsFragment.kt @@ -30,7 +30,6 @@ class ClassicPlayerPlaybackControlsFragment : AbsPlayerControlsFragment() { playerPlayPauseFab.animate() .scaleX(1f) .scaleY(1f) - .rotation(360f) .setInterpolator(DecelerateInterpolator()) .start() } @@ -50,19 +49,19 @@ class ClassicPlayerPlaybackControlsFragment : AbsPlayerControlsFragment() { fun setDark(dark: Boolean) { if (dark) { - lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(getActivity(), true); - lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(getActivity(), true); + lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(activity, true) + lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(activity, true) } else { - lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(getActivity(), false); - lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false); + lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(activity, false) + lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(activity, false) } //volumeFragment?.setTintableColor(lastPlaybackControlsColor) - updateRepeatState(); - updateShuffleState(); - updatePrevNextColor(); - updateProgressTextColor(); + updateRepeatState() + updateShuffleState() + updatePrevNextColor() + updateProgressTextColor() } private var playerFabPlayPauseDrawable: PlayPauseDrawable? = null