Added classic theme
This commit is contained in:
parent
5a36491ad2
commit
0950e988c9
4 changed files with 20 additions and 14 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue