Fix theme

This commit is contained in:
h4h13 2019-12-05 23:48:54 +05:30
parent efa21c8c91
commit ac0babeb80
80 changed files with 1083 additions and 685 deletions

View file

@ -23,14 +23,14 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.RetroMusic.Light"
android:theme="@style/Theme.RetroMusic.FollowSystem"
android:usesCleartextTraffic="false"
tools:ignore="AllowBackup,GoogleAppIndexingWarning"
tools:targetApi="m">
<activity
android:name=".activities.MainActivity"
android:label="@string/app_name"
android:theme="@style/Theme.RetroMusic.FollowSystem">
android:theme="@style/SplashTheme"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.MUSIC_PLAYER" />

View file

@ -61,10 +61,11 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener {
}
override fun onCreate(savedInstanceState: Bundle?) {
setDrawUnderStatusBar()
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_about)
setStatusbarColorAuto()
setNavigationBarColorPrimary()
setNavigationbarColorAuto()
setLightNavigationBar(true)

View file

@ -57,10 +57,11 @@ public class LicenseActivity extends AbsBaseActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
setDrawUnderStatusBar();
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_license);
setStatusbarColorAuto();
setNavigationBarColorPrimary();
setNavigationbarColorAuto();
setLightNavigationBar(true);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);

View file

@ -34,7 +34,7 @@ class LockScreenActivity : AbsMusicServiceActivity() {
hideStatusBar()
setStatusbarColorAuto()
setNavigationBarColorPrimary()
setNavigationbarColorAuto()
setTaskDescriptionColorAuto()
setLightNavigationBar(true)

View file

@ -89,7 +89,7 @@ class LyricsActivity : AbsMusicServiceActivity(), View.OnClickListener, ViewPage
setContentView(R.layout.activity_lyrics)
setStatusbarColorAuto()
setTaskDescriptionColorAuto()
setNavigationBarColorPrimary()
setNavigationbarColorAuto()
applyToolbar(toolbar)
fab.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this))

View file

@ -33,10 +33,11 @@ open class PlayingQueueActivity : AbsMusicServiceActivity() {
}
override fun onCreate(savedInstanceState: Bundle?) {
setDrawUnderStatusBar()
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_playing_queue)
setStatusbarColorAuto()
setNavigationBarColorPrimary()
setNavigationbarColorAuto()
setTaskDescriptionColorAuto()
setLightNavigationBar(true)

View file

@ -27,7 +27,7 @@ class PurchaseActivity : AbsBaseActivity(), BillingProcessor.IBillingHandler {
setContentView(R.layout.activity_pro_version)
setDrawUnderStatusBar()
setStatusbarColorAuto()
setNavigationBarColorPrimary()
setNavigationbarColorAuto()
setTaskDescriptionColorAuto()
setLightNavigationBar(true)

View file

@ -18,6 +18,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.transition.TransitionManager
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.retromusic.App
@ -26,7 +27,6 @@ import code.name.monkey.retromusic.activities.base.AbsMusicServiceActivity
import code.name.monkey.retromusic.adapter.SearchAdapter
import code.name.monkey.retromusic.mvp.presenter.SearchPresenter
import code.name.monkey.retromusic.mvp.presenter.SearchView
import code.name.monkey.retromusic.util.RetroColorUtil
import code.name.monkey.retromusic.util.RetroUtil
import com.google.android.material.textfield.TextInputEditText
import kotlinx.android.synthetic.main.activity_search.*
@ -45,14 +45,14 @@ class SearchActivity : AbsMusicServiceActivity(), OnQueryTextListener, TextWatch
setDrawUnderStatusBar()
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_search)
App.musicComponent.inject(this)
searchPresenter.attachView(this)
setStatusbarColorAuto()
setNavigationBarColorPrimary()
setNavigationbarColorAuto()
setTaskDescriptionColorAuto()
setLightNavigationBar(true)
App.musicComponent.inject(this)
searchPresenter.attachView(this)
setupRecyclerView()
setUpToolBar()
setupSearchView()
@ -64,7 +64,7 @@ class SearchActivity : AbsMusicServiceActivity(), OnQueryTextListener, TextWatch
back.setOnClickListener { onBackPressed() }
voiceSearch.setOnClickListener { startMicSearch() }
clearText.setOnClickListener { searchView.clearText() }
searchContainer.setCardBackgroundColor(RetroColorUtil.toolbarColor(this))
searchContainer.backgroundTintList = ColorStateList.valueOf(ATHUtil.resolveColor(this, R.attr.colorSurface))
keyboardPopup.setOnClickListener {
val inputManager = getSystemService(Service.INPUT_METHOD_SERVICE) as InputMethodManager

View file

@ -17,10 +17,11 @@ class SettingsActivity : AbsBaseActivity() {
private val fragmentManager = supportFragmentManager
override fun onCreate(savedInstanceState: Bundle?) {
setDrawUnderStatusBar()
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_settings)
setStatusbarColorAuto()
setNavigationBarColorPrimary()
setNavigationbarColorAuto()
setLightNavigationBar(true)
setupToolbar()
@ -31,13 +32,13 @@ class SettingsActivity : AbsBaseActivity() {
}
private fun setupToolbar() {
setSupportActionBar(toolbar)
setTitle(R.string.action_settings)
toolbar.apply {
setBackgroundColor(ATHUtil.resolveColor(this@SettingsActivity, R.attr.colorSurface))
setNavigationOnClickListener { onBackPressed() }
ToolbarContentTintHelper.colorBackButton(toolbar)
}
setSupportActionBar(toolbar)
}
fun setupFragment(fragment: Fragment, @StringRes titleName: Int) {

View file

@ -59,7 +59,7 @@ class SupportDevelopmentActivity : AbsBaseActivity(), BillingProcessor.IBillingH
setContentView(R.layout.activity_donation)
setStatusbarColorAuto()
setNavigationBarColorPrimary()
setNavigationbarColorAuto()
setTaskDescriptionColorAuto()
setLightNavigationBar(true)

View file

@ -48,7 +48,7 @@ class UserInfoActivity : AbsBaseActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_user_info)
setStatusbarColorAuto()
setNavigationBarColorPrimary()
setNavigationbarColorAuto()
setTaskDescriptionColorAuto()
setLightNavigationBar(true)

View file

@ -49,11 +49,11 @@ public class WhatsNewActivity extends AbsBaseActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
setDrawUnderStatusBar();
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_whats_new);
setStatusbarColorAuto();
setNavigationBarColorPrimary();
setNavigationbarColorAuto();
setTaskDescriptionColorAuto();
webView = findViewById(R.id.webView);

View file

@ -100,13 +100,13 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
else -> window.statusBarColor = ColorUtil.darkenColor(color)
}
}
setLightStatusbarAuto(ATHUtil.resolveColor(this, android.R.attr.windowBackground))
setLightStatusbarAuto(ATHUtil.resolveColor(this, R.attr.colorSurface))
}
fun setStatusbarColorAuto() {
// we don't want to use statusbar color because we are doing the color darkening on our own to support KitKat
//setStatusbarColor(ATHUtil.resolveColor(this, android.R.attr.windowBackground))
setLightStatusbarAuto(ATHUtil.resolveColor(this, android.R.attr.windowBackground))
setLightStatusbarAuto(ATHUtil.resolveColor(this, R.attr.colorSurface))
}
open fun setTaskDescriptionColor(@ColorInt color: Int) {
@ -114,7 +114,7 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
}
fun setTaskDescriptionColorAuto() {
setTaskDescriptionColor(ATHUtil.resolveColor(this, android.R.attr.windowBackground))
setTaskDescriptionColor(ATHUtil.resolveColor(this, R.attr.colorSurface))
}
open fun setNavigationbarColor(color: Int) {
@ -125,12 +125,8 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
}
}
open fun setNavigationBarColorPrimary() {
ATH.setNavigationbarColor(this, ATHUtil.resolveColor(this, android.R.attr.windowBackground))
}
fun setNavigationbarColorAuto() {
setNavigationbarColor(ATHUtil.resolveColor(this, android.R.attr.windowBackground))
setNavigationbarColor(ATHUtil.resolveColor(this, R.attr.colorSurface))
}
open fun setLightStatusbar(enabled: Boolean) {

View file

@ -62,6 +62,7 @@ open class BugReportActivity : AbsThemeActivity() {
private var deviceInfo: DeviceInfo? = null
override fun onCreate(savedInstanceState: Bundle?) {
setDrawUnderStatusBar()
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_bug_report)
setStatusbarColorAuto()

View file

@ -81,7 +81,7 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
dialog?.window?.let {
(requireActivity() as MainActivity).setNavigationBarColorPrimary()
(requireActivity() as MainActivity).setNavigationbarColorAuto()
(requireActivity() as MainActivity).setLightNavigationBar(true)
}

View file

@ -1,18 +1,22 @@
package code.name.monkey.retromusic.fragments
import android.content.Context
import android.graphics.*
import android.graphics.Color
import android.graphics.PorterDuff
import android.media.AudioManager
import android.os.Bundle
import android.view.*
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.SeekBar
import androidx.fragment.app.Fragment
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.util.*
import code.name.monkey.retromusic.volume.*
import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.ViewUtil
import code.name.monkey.retromusic.volume.AudioVolumeObserver
import code.name.monkey.retromusic.volume.OnAudioVolumeChangedListener
import kotlinx.android.synthetic.main.fragment_volume.*
class VolumeFragment : Fragment(), SeekBar.OnSeekBarChangeListener, OnAudioVolumeChangedListener, View.OnClickListener {
@ -33,10 +37,6 @@ class VolumeFragment : Fragment(), SeekBar.OnSeekBarChangeListener, OnAudioVolum
setTintable(ThemeStore.accentColor(requireContext()))
volumeDown.setOnClickListener(this)
volumeUp.setOnClickListener(this)
val iconColor = ATHUtil.resolveColor(requireContext(), R.attr.iconColor)
volumeDown.setColorFilter(iconColor, PorterDuff.Mode.SRC_IN)
volumeUp.setColorFilter(iconColor, PorterDuff.Mode.SRC_IN)
}
override fun onResume() {

View file

@ -1,6 +1,5 @@
package code.name.monkey.retromusic.fragments.base
import android.os.Build
import android.os.Bundle
import android.view.View
import code.name.monkey.appthemehelper.util.ATHUtil
@ -29,8 +28,8 @@ abstract class AbsMainActivityFragment : AbsMusicServiceFragment() {
private fun setStatusBarColor(view: View, color: Int) {
val statusBar = view.findViewById<View>(R.id.status_bar)
if (statusBar != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
//statusBar.setBackgroundColor(color)
if (VersionUtils.hasMarshmallow()) {
statusBar.setBackgroundColor(color)
mainActivity.setLightStatusbarAuto(color)
} else {
statusBar.setBackgroundColor(color)
@ -39,7 +38,7 @@ abstract class AbsMainActivityFragment : AbsMusicServiceFragment() {
}
fun setStatusBarColorAuto(view: View) {
val colorPrimary = ATHUtil.resolveColor(requireContext(), android.R.attr.windowBackground)
val colorPrimary = ATHUtil.resolveColor(requireContext(), R.attr.colorSurface)
// we don't want to use statusbar color because we are doing the color darkening on our own to support KitKat
if (VersionUtils.hasMarshmallow()) {
setStatusBarColor(view, colorPrimary)

View file

@ -188,7 +188,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
.setMenu(menuRes)
.setCloseDrawableRes(R.drawable.ic_close_white_24dp)
.setBackgroundColor(
RetroColorUtil.shiftBackgroundColorForLightText(ATHUtil.INSTANCE.resolveColor(requireContext(), R.attr.colorPrimary)))
RetroColorUtil.shiftBackgroundColorForLightText(ATHUtil.INSTANCE.resolveColor(requireContext(), R.attr.colorSurface)))
.start(callback);
return cab;
}

View file

@ -307,7 +307,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
cab = new MaterialCab(getMainActivity(), R.id.cab_stub)
.setMenu(menuRes)
.setCloseDrawableRes(R.drawable.ic_close_white_24dp)
.setBackgroundColor(RetroColorUtil.shiftBackgroundColorForLightText(ATHUtil.INSTANCE.resolveColor(requireContext(), R.attr.colorPrimary)))
.setBackgroundColor(RetroColorUtil.shiftBackgroundColorForLightText(ATHUtil.INSTANCE.resolveColor(requireContext(), R.attr.colorSurface)))
.start(callback);
return cab;
}

View file

@ -1,12 +1,14 @@
package code.name.monkey.retromusic.fragments.mainactivity.home
import android.app.ActivityOptions
import android.content.res.ColorStateList
import android.os.Bundle
import android.util.DisplayMetrics
import android.view.*
import androidx.appcompat.widget.Toolbar
import androidx.recyclerview.widget.LinearLayoutManager
import code.name.monkey.appthemehelper.common.ATHToolbarActivity
import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.App
@ -98,11 +100,11 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
setupToolbar()
userImage.setOnClickListener {
userImage?.setOnClickListener {
val options = ActivityOptions.makeSceneTransitionAnimation(mainActivity, userImage, getString(R.string.transition_user_image))
NavigationUtil.goToUserInfo(requireActivity(), options)
}
titleWelcome.text = String.format("%s", PreferenceUtil.getInstance(requireContext()).userName)
titleWelcome?.text = String.format("%s", PreferenceUtil.getInstance(requireContext()).userName)
App.musicComponent.inject(this)
homeAdapter = HomeAdapter(mainActivity, displayMetrics)
@ -125,7 +127,7 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
private fun setupToolbar() {
toolbar.apply {
setBackgroundColor(RetroColorUtil.toolbarColor(mainActivity))
backgroundTintList = ColorStateList.valueOf(ATHUtil.resolveColor(requireContext(), R.attr.colorSurface))
setNavigationIcon(R.drawable.ic_menu_white_24dp)
setOnClickListener {
val options = ActivityOptions.makeSceneTransitionAnimation(mainActivity, toolbarContainer, getString(R.string.transition_toolbar))

View file

@ -143,9 +143,9 @@ class AdaptiveFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Call
playerToolbar.apply {
inflateMenu(R.menu.menu_player)
setNavigationOnClickListener { requireActivity().onBackPressed() }
ToolbarContentTintHelper.colorizeToolbar(this, primaryColor, activity)
ToolbarContentTintHelper.colorizeToolbar(this, primaryColor, requireActivity())
setTitleTextColor(primaryColor)
setSubtitleTextColor(ThemeStore.textColorSecondary(context!!))
setSubtitleTextColor(ThemeStore.textColorSecondary(requireContext()))
setOnMenuItemClickListener(this@AdaptiveFragment)
}
}
@ -183,8 +183,8 @@ class AdaptiveFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Call
override fun onColorChanged(color: Int) {
playbackControlsFragment.setDark(color)
lastColor = color
callbacks!!.onPaletteColorChanged()
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(context, R.attr.iconColor), activity)
callbacks?.onPaletteColorChanged()
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal), requireActivity())
}
override fun onShow() {
@ -201,7 +201,7 @@ class AdaptiveFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Call
}
override fun toolbarIconColor(): Int {
return ATHUtil.resolveColor(context, R.attr.iconColor)
return ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal)
}
override val paletteColor: Int

View file

@ -8,10 +8,10 @@ import androidx.appcompat.widget.Toolbar
import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.fragments.base.AbsPlayerFragment
import code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.model.Song
import kotlinx.android.synthetic.main.fragment_fit.*
@ -40,15 +40,15 @@ class FitFragment : AbsPlayerFragment() {
}
override fun toolbarIconColor(): Int {
return ATHUtil.resolveColor(context, R.attr.iconColor)
return ATHUtil.resolveColor(context, R.attr.colorControlNormal)
}
override fun onColorChanged(color: Int) {
playbackControlsFragment.setDark(color)
lastColor = color
callbacks!!.onPaletteColorChanged()
callbacks?.onPaletteColorChanged()
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(context, R.attr.iconColor), activity)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal), requireActivity())
}
@ -84,11 +84,11 @@ class FitFragment : AbsPlayerFragment() {
}
private fun setUpPlayerToolbar() {
playerToolbar!!.apply {
playerToolbar.apply {
inflateMenu(R.menu.menu_player)
setNavigationOnClickListener { activity!!.onBackPressed() }
setNavigationOnClickListener { requireActivity().onBackPressed() }
setOnMenuItemClickListener(this@FitFragment)
ToolbarContentTintHelper.colorizeToolbar(this, ATHUtil.resolveColor(context, R.attr.iconColor), activity)
ToolbarContentTintHelper.colorizeToolbar(this, ATHUtil.resolveColor(context, R.attr.iconColor), requireActivity())
}
}

View file

@ -41,10 +41,9 @@ class FlatPlayerFragment : AbsPlayerFragment() {
private fun setUpPlayerToolbar() {
playerToolbar.inflateMenu(R.menu.menu_player)
playerToolbar.setNavigationOnClickListener { _ -> activity!!.onBackPressed() }
playerToolbar.setNavigationOnClickListener { _ -> requireActivity().onBackPressed() }
playerToolbar.setOnMenuItemClickListener(this)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(context,
R.attr.iconColor), activity)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(context, R.attr.iconColor), requireActivity())
}
private fun colorize(i: Int) {
@ -90,24 +89,21 @@ class FlatPlayerFragment : AbsPlayerFragment() {
override fun toolbarIconColor(): Int {
val isLight = ColorUtil.isColorLight(paletteColor)
return if (PreferenceUtil.getInstance(requireContext()).adaptiveColor)
MaterialValueHelper.getPrimaryTextColor(context, isLight)
MaterialValueHelper.getPrimaryTextColor(requireContext(), isLight)
else
ATHUtil.resolveColor(context, R.attr.iconColor)
ATHUtil.resolveColor(context, R.attr.colorControlNormal)
}
override fun onColorChanged(color: Int) {
lastColor = color
flatPlaybackControlsFragment.setDark(color)
callbacks!!.onPaletteColorChanged()
callbacks?.onPaletteColorChanged()
val isLight = ColorUtil.isColorLight(color)
//TransitionManager.beginDelayedTransition(mToolbar);
val iconColor = if (PreferenceUtil.getInstance(requireContext()).adaptiveColor)
MaterialValueHelper.getPrimaryTextColor(context!!, isLight)
MaterialValueHelper.getPrimaryTextColor(requireContext(), isLight)
else
ATHUtil.resolveColor(context!!, R.attr.iconColor)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, iconColor, activity)
ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, iconColor, requireActivity())
if (PreferenceUtil.getInstance(requireContext()).adaptiveColor) {
colorize(color)
}

View file

@ -44,7 +44,7 @@ class MaterialFragment : AbsPlayerFragment() {
}
override fun toolbarIconColor(): Int {
return ATHUtil.resolveColor(requireContext(), R.attr.iconColor)
return ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal)
}
override fun onColorChanged(color: Int) {
@ -52,7 +52,7 @@ class MaterialFragment : AbsPlayerFragment() {
lastColor = color
callbacks?.onPaletteColorChanged()
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(requireContext(), R.attr.iconColor), requireActivity())
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal), requireActivity())
}
override fun toggleFavorite(song: Song) {
@ -89,7 +89,7 @@ class MaterialFragment : AbsPlayerFragment() {
inflateMenu(R.menu.menu_player)
setNavigationOnClickListener { requireActivity().onBackPressed() }
setOnMenuItemClickListener(this@MaterialFragment)
ToolbarContentTintHelper.colorizeToolbar(this, ATHUtil.resolveColor(context, R.attr.iconColor), requireActivity())
ToolbarContentTintHelper.colorizeToolbar(this, ATHUtil.resolveColor(context, R.attr.colorControlNormal), requireActivity())
}
}

View file

@ -3,7 +3,6 @@ package code.name.monkey.retromusic.fragments.player.normal
import android.animation.ArgbEvaluator
import android.animation.ValueAnimator
import android.graphics.drawable.GradientDrawable
import android.os.Build
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
@ -34,15 +33,19 @@ class PlayerFragment : AbsPlayerFragment() {
private fun colorize(i: Int) {
if (valueAnimator != null) {
valueAnimator!!.cancel()
valueAnimator?.cancel()
}
valueAnimator = ValueAnimator.ofObject(ArgbEvaluator(), android.R.color.transparent, i)
valueAnimator!!.addUpdateListener { animation ->
val drawable = DrawableGradient(GradientDrawable.Orientation.TOP_BOTTOM, intArrayOf(animation.animatedValue as Int, android.R.color.transparent), 0)
valueAnimator = ValueAnimator.ofObject(ArgbEvaluator(), ATHUtil.resolveColor(requireContext(), R.attr.colorSurface), i)
valueAnimator?.addUpdateListener { animation ->
if (isAdded) {
val drawable = DrawableGradient(GradientDrawable.Orientation.TOP_BOTTOM,
intArrayOf(animation.animatedValue as Int,
ATHUtil.resolveColor(requireContext(), R.attr.colorSurface)), 0)
colorGradientBackground?.background = drawable
}
valueAnimator!!.setDuration(ViewUtil.RETRO_MUSIC_ANIM_TIME.toLong()).start()
}
valueAnimator?.setDuration(ViewUtil.RETRO_MUSIC_ANIM_TIME.toLong())?.start()
}
override fun onShow() {
@ -59,25 +62,21 @@ class PlayerFragment : AbsPlayerFragment() {
}
override fun toolbarIconColor(): Int {
return ATHUtil.resolveColor(context, R.attr.iconColor)
return ATHUtil.resolveColor(context, R.attr.colorControlNormal)
}
override fun onColorChanged(color: Int) {
playbackControlsFragment.setDark(color)
lastColor = color
callbacks!!.onPaletteColorChanged()
callbacks?.onPaletteColorChanged()
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(context, R.attr.iconColor), activity)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(context, R.attr.colorControlNormal), activity)
if (PreferenceUtil.getInstance(requireContext()).adaptiveColor) {
colorize(color)
}
}
private fun getCutOff(): Int {
return if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1) 20 else 0
}
override fun toggleFavorite(song: Song) {
super.toggleFavorite(song)
if (song.id == MusicPlayerRemote.currentSong.id) {

View file

@ -60,9 +60,9 @@ class PeakPlayerFragment : AbsPlayerFragment() {
private fun setUpPlayerToolbar() {
playerToolbar.apply {
inflateMenu(R.menu.menu_player)
setNavigationOnClickListener { activity!!.onBackPressed() }
setNavigationOnClickListener { requireActivity().onBackPressed() }
setOnMenuItemClickListener(this@PeakPlayerFragment)
ToolbarContentTintHelper.colorizeToolbar(this, ATHUtil.resolveColor(context, R.attr.iconColor), activity)
ToolbarContentTintHelper.colorizeToolbar(this, ATHUtil.resolveColor(context, R.attr.colorControlNormal), requireActivity())
}
}
@ -83,7 +83,7 @@ class PeakPlayerFragment : AbsPlayerFragment() {
}
override fun toolbarIconColor(): Int {
return ATHUtil.resolveColor(requireContext(), R.attr.iconColor)
return ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal)
}
override val paletteColor: Int

View file

@ -15,13 +15,10 @@ object ThemeManager {
@StyleRes
fun getThemeResValue(context: Context): Int = when (PreferenceUtil.getInstance(context).generalThemeValue) {
"light" -> R.style.Theme_RetroMusic_Light
"dark" -> R.style.Theme_RetroMusic_Base
"auto" -> R.style.Theme_RetroMusic_FollowSystem
"black" -> R.style.Theme_RetroMusic_Black
else -> R.style.Theme_RetroMusic
/**
* To add a toggle for amoled theme just add an if statement such as
* if(PreferenceUtil.getInstance(context).useAmoled) blablabla
*/
else -> R.style.Theme_RetroMusic_FollowSystem
}
private fun isSystemDarkModeEnabled(context: Context): Boolean {

View file

@ -42,7 +42,7 @@ class BottomNavigationBarTinted @JvmOverloads constructor(
val accentColor = ThemeStore.accentColor(context)
NavigationViewUtil.setItemIconColors(this, ColorUtil.withAlpha(iconColor, 0.5f), accentColor)
NavigationViewUtil.setItemTextColors(this, ColorUtil.withAlpha(iconColor, 0.5f), accentColor)
itemBackground = RippleDrawable(RippleUtils.convertToRippleDrawableColor(ColorStateList.valueOf(ThemeStore.accentColor(context).addAlpha())), ContextCompat.getDrawable(context, R.drawable.bottom_navigation_item_background), null)
itemBackground = RippleDrawable(RippleUtils.convertToRippleDrawableColor(ColorStateList.valueOf(ThemeStore.accentColor(context).addAlpha())), ContextCompat.getDrawable(context, R.drawable.bottom_navigation_item_background), ContextCompat.getDrawable(context, R.drawable.bottom_navigation_item_background_mask))
setOnApplyWindowInsetsListener(null)
//itemRippleColor = ColorStateList.valueOf(accentColor)
backgroundTintList = ColorStateList.valueOf(ATHUtil.resolveColor(context, android.R.attr.windowBackground))

View file

@ -1,6 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="8dp" />
<solid android:color="?android:attr/windowBackground" />
<solid android:color="?colorSurface" />
</shape>
<!--<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/colorBottomTabSelected">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/colorBottomTabSelected"/>
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@color/colorBottomTabUnselected"/>
</shape>
</item>
</ripple>-->

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?attr/colorSurface" />
<corners android:radius="8dp" />
</shape>

View file

@ -17,60 +17,9 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
app:contentScrim="@android:color/transparent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:statusBarScrim="@color/md_black_1000"
app:titleEnabled="false">
<FrameLayout
android:id="@+id/imageContainer"
android:layout_width="match_parent"
android:layout_height="182dp"
app:layout_collapseMode="pin">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/bannerImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
app:layout_collapseMode="parallax"
tools:background="@color/md_red_400"
tools:ignore="ContentDescription"
tools:srcCompat="@tools:sample/backgrounds/scenic[9]" />
<View
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_gravity="bottom"
android:background="@drawable/shadow_up_full_theme"
android:backgroundTint="?android:attr/windowBackground" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -78,38 +27,6 @@
<include layout="@layout/status_bar" />
</FrameLayout>
<com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
android:layout_marginTop="@dimen/toolbar_margin_vertical"
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
app:cardBackgroundColor="@android:color/transparent"
app:cardCornerRadius="8dp"
app:cardElevation="6dp"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height"
android:background="?colorSurface"
app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp"
app:popupTheme="?toolbarPopupTheme"
app:title="@string/search_hint"
app:titleMarginStart="0dp"
app:titleTextAppearance="@style/ToolbarTextAppearanceSearch"
tools:ignore="UnusedAttribute" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -118,14 +35,110 @@
app:behavior_overlapTop="72dp"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView
android:id="@+id/imageContainer"
android:layout_width="match_parent"
android:layout_height="228dp"
app:cardCornerRadius="24dp"
app:cardUseCompatPadding="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/bannerImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardCornerRadius="16dp"
app:cardElevation="8dp">
android:scaleType="centerCrop"
app:layout_collapseMode="parallax"
tools:ignore="ContentDescription"
tools:srcCompat="@tools:sample/backgrounds/scenic[9]" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
android:layout_marginTop="8dp"
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
app:cardBackgroundColor="@android:color/transparent"
app:cardCornerRadius="8dp"
app:cardUseCompatPadding="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_scrollFlags="scroll|enterAlways"
app:shapeAppearance="@style/ToolbarCornerCardView">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height"
android:background="?attr/colorSurface"
app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp"
app:popupTheme="?toolbarPopupTheme"
app:title="@string/search_hint"
app:titleMarginStart="0dp"
app:titleTextAppearance="@style/ToolbarTextAppearanceSearch"
tools:ignore="UnusedAttribute" />
</com.google.android.material.card.MaterialCardView>
<View
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="@drawable/shadow_up"
app:layout_constraintBottom_toBottomOf="parent" />
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/userImage"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginStart="16dp"
android:layout_marginBottom="8dp"
app:civ_border="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:ellipsize="end"
android:text="@string/welcome"
android:textColor="@color/md_white_1000"
app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toTopOf="@+id/userImage" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/titleWelcome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="0dp"
android:textAppearance="@style/TextViewHeadline5"
android:textColor="@color/md_white_1000"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/userImage"
app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toBottomOf="@+id/text"
tools:text="@string/app_name" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<include layout="@layout/home_content" />
</com.google.android.material.card.MaterialCardView>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>

View file

@ -8,6 +8,11 @@
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<fragment
android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"

View file

@ -8,6 +8,11 @@
android:focusable="true"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<View
android:id="@+id/colorGradientBackground"
android:layout_width="match_parent"

View file

@ -17,6 +17,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical">
<FrameLayout
@ -76,7 +77,56 @@
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<include layout="@layout/home_content" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/userImage"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
app:civ_border="false"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:ellipsize="end"
android:text="@string/welcome"
app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toTopOf="@+id/userImage"
tools:text="@tools:sample/lorem" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/titleWelcome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="0dp"
android:textAppearance="@style/TextViewHeadline5"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/userImage"
app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toBottomOf="@+id/text"
tools:text="@tools:sample/lorem" />
<include
layout="@layout/home_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/titleWelcome" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -7,6 +7,11 @@
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout

View file

@ -7,6 +7,11 @@
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<include layout="@layout/shadow_statusbar_toolbar" />

View file

@ -7,6 +7,11 @@
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<View
android:id="@+id/colorGradientBackground"
android:layout_width="match_parent"

View file

@ -8,6 +8,13 @@
android:focusable="true"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/gradient_background"
android:layout_width="match_parent"

View file

@ -18,6 +18,7 @@
android:id="@+id/main_fragment_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical">
<androidx.coordinatorlayout.widget.CoordinatorLayout

View file

@ -17,6 +17,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_fragment_content"
android:layout_width="match_parent"
android:background="?attr/colorSurface"
android:layout_height="match_parent"
android:orientation="vertical">
@ -76,8 +77,56 @@
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<include layout="@layout/home_content" />
</androidx.core.widget.NestedScrollView>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/userImage"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
app:civ_border="false"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:ellipsize="end"
android:text="@string/welcome"
app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toTopOf="@+id/userImage"
tools:text="@tools:sample/lorem" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/titleWelcome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="0dp"
android:textAppearance="@style/TextViewHeadline5"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/userImage"
app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toBottomOf="@+id/text"
tools:text="@tools:sample/lorem" />
<include
layout="@layout/home_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/titleWelcome" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -7,6 +7,11 @@
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<View
android:id="@+id/colorGradientBackground"
android:layout_width="match_parent"

View file

@ -135,7 +135,7 @@
android:paddingRight="8dp"
android:singleLine="true"
android:textAppearance="@style/TextViewHeadline6"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />
@ -149,7 +149,7 @@
android:paddingLeft="8dp"
android:singleLine="true"
android:textAppearance="@style/TextViewHeadline6"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />
</RelativeLayout>

View file

@ -17,6 +17,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical">
<androidx.coordinatorlayout.widget.CoordinatorLayout

View file

@ -18,6 +18,7 @@
android:id="@+id/main_fragment_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical">
<FrameLayout
@ -78,7 +79,56 @@
android:layout_weight="1"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<include layout="@layout/home_content" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/userImage"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
app:civ_border="false"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:ellipsize="end"
android:text="@string/welcome"
app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toTopOf="@+id/userImage"
tools:text="@tools:sample/lorem" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/titleWelcome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="0dp"
android:textAppearance="@style/TextViewHeadline5"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/userImage"
app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toBottomOf="@+id/text"
tools:text="@tools:sample/lorem" />
<include
layout="@layout/home_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/titleWelcome" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -7,6 +7,11 @@
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<View
android:id="@+id/colorGradientBackground"
android:layout_width="match_parent"

View file

@ -1,8 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<code.name.monkey.retromusic.views.StatusBarView
android:id="@+id/status_bar"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="?attr/colorSurface"
tools:ignore="UnusedAttribute" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
@ -28,3 +43,4 @@
<include layout="@layout/activity_about_content" />
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -1,12 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical">
<code.name.monkey.retromusic.views.StatusBarView
android:id="@+id/status_bar"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="?attr/colorSurface"
tools:ignore="UnusedAttribute" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -60,3 +71,4 @@
android:layout_margin="16dp"
app:srcCompat="@drawable/ic_send_white_24dp" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -1,9 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<code.name.monkey.retromusic.views.StatusBarView
android:id="@+id/status_bar"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="?attr/colorSurface"
tools:ignore="UnusedAttribute" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
@ -35,3 +48,4 @@
android:layout_height="match_parent" />
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -1,16 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:background="?attr/colorSurface"
android:orientation="vertical"
tools:ignore="UnusedAttribute">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/status_bar" />
</FrameLayout>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp"
app:liftOnScroll="true">
<com.google.android.material.appbar.CollapsingToolbarLayout
@ -75,3 +90,4 @@
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -51,7 +51,6 @@
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:scrollbars="none"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />

View file

@ -1,9 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<code.name.monkey.retromusic.views.StatusBarView
android:id="@+id/status_bar"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="?attr/colorSurface"
tools:ignore="UnusedAttribute" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
@ -32,4 +45,5 @@
</com.google.android.material.appbar.AppBarLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -1,10 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.WhatsNewActivity">
android:orientation="vertical">
<code.name.monkey.retromusic.views.StatusBarView
android:id="@+id/status_bar"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="?attr/colorSurface"
tools:ignore="UnusedAttribute" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
@ -37,3 +50,4 @@
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -2,14 +2,16 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:focusable="true">
android:background="?attr/colorSurface" />
<include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -11,36 +11,13 @@
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
app:contentScrim="@android:color/transparent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:statusBarScrim="@color/md_black_1000"
app:titleEnabled="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways">
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
@ -49,11 +26,6 @@
<include layout="@layout/status_bar" />
</FrameLayout>
</LinearLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -165,4 +137,4 @@
<include layout="@layout/home_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -4,10 +4,14 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/windowBackground"
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<fragment
android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
@ -15,6 +19,8 @@
android:layout_height="match_parent"
tools:layout="@layout/fragment_album_full_cover" />
<include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -7,6 +7,11 @@
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -21,7 +21,7 @@
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />
@ -34,7 +34,7 @@
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />

View file

@ -8,6 +8,11 @@
android:focusable="true"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<View
android:id="@+id/colorGradientBackground"
android:layout_width="match_parent"

View file

@ -27,7 +27,7 @@
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
@ -39,7 +39,7 @@
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />

View file

@ -7,6 +7,11 @@
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<fragment
android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"

View file

@ -17,6 +17,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical">
<FrameLayout
@ -71,7 +72,56 @@
android:layout_height="wrap_content"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<include layout="@layout/home_content" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/userImage"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
app:civ_border="false"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:ellipsize="end"
android:text="@string/welcome"
app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toTopOf="@+id/userImage"
tools:text="@tools:sample/lorem" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/titleWelcome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="0dp"
android:textAppearance="@style/TextViewHeadline5"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/userImage"
app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toBottomOf="@+id/text"
tools:text="@tools:sample/lorem" />
<include
layout="@layout/home_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/titleWelcome" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -17,6 +17,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical">
<FrameLayout

View file

@ -19,7 +19,6 @@
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="true"
app:strokeColor="?dividerColor"
app:strokeWidth="1.5dp">
<androidx.constraintlayout.widget.ConstraintLayout
@ -69,7 +68,7 @@
android:layout_height="1dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="?dividerColor"
android:background="?attr/dividerHorizontal"
app:layout_constraintTop_toBottomOf="@id/text" />
<com.google.android.material.button.MaterialButton

View file

@ -7,6 +7,11 @@
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout

View file

@ -28,7 +28,7 @@
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />
@ -42,7 +42,7 @@
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />
@ -100,7 +100,8 @@
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1" android:paddingStart="16dp"
android:maxLines="1"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewBody1"
app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer"

View file

@ -39,7 +39,7 @@
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />
@ -53,7 +53,7 @@
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />

View file

@ -21,6 +21,14 @@
android:focusable="true"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<FrameLayout
android:id="@+id/toolbarContainer"
android:layout_width="match_parent"
@ -91,7 +99,7 @@
android:ellipsize="end"
android:maxLines="2"
android:textAppearance="@style/TextViewBody2"
android:textColor="?attr/colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintBottom_toBottomOf="@+id/imageContainer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageContainer"
@ -112,3 +120,4 @@
tools:layout="@layout/fragment_peak_control_player" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -26,7 +26,7 @@
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />
@ -40,7 +40,7 @@
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />

View file

@ -7,6 +7,11 @@
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout
@ -50,8 +55,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:paddingTop="8dp"
android:maxLines="1"
android:paddingTop="8dp"
android:textColor="?colorOnBackground"
tools:text="Text" />
</LinearLayout>

View file

@ -7,6 +7,11 @@
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<View
android:id="@+id/colorGradientBackground"
android:layout_width="match_parent"

View file

@ -42,7 +42,7 @@
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />
@ -56,7 +56,7 @@
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textColor="?colorOnSecondary"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:22" />
@ -101,7 +101,8 @@
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1" android:paddingStart="16dp"
android:maxLines="1"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewBody1"
android:textColor="?android:attr/textColorSecondary"
@ -205,9 +206,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingStart="8dp"
android:paddingEnd="8dp"
app:layout_constraintBottom_toBottomOf="parent"
tools:backgroundTint="@color/md_red_400"
tools:background="@color/md_red_400"
tools:layout_height="52dp" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -8,6 +8,13 @@
android:focusable="true"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout

View file

@ -8,8 +8,8 @@
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingBottom="12dp">
android:paddingBottom="14dp"
android:paddingEnd="8dp" >
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/volumeDown"

View file

@ -11,7 +11,6 @@
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@ -61,7 +60,7 @@
android:layout_width="96dp"
android:layout_height="96dp"
app:srcCompat="@drawable/ic_play_arrow_white_64dp"
app:tint="?colorOnSecondary" />
app:tint="?attr/colorControlNormal" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/emptyText"
@ -70,7 +69,7 @@
android:layout_gravity="center"
android:text="@string/start_play_music"
android:textAppearance="@style/TextViewNormal"
android:textColor="?colorOnBackground" />
android:textColor="?android:attr/textColorPrimary" />
</LinearLayout>
</FrameLayout>
</LinearLayout>

View file

@ -9,15 +9,16 @@
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="16dp"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/full_names" />
tools:text="@tools:sample/lorem" />
<code.name.monkey.retromusic.views.MetalRecyclerViewPager
android:id="@+id/recyclerView"

View file

@ -10,15 +10,16 @@
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="16dp"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/full_names" />
tools:text="@tools:sample/lorem" />
<androidx.recyclerview.widget.RecyclerView

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<resources>
<style name="Theme.RetroMusic.Base.Adaptive" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="md_font_title">@font/circular</item>
<item name="md_font_body">@font/circular</item>
<item name="md_font_button">@font/circular</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="android:windowActivityTransitions">true</item>
<item name="android:fontFamily">@font/circular</item>
<item name="windowActionBarOverlay">true</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
<item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
<item name="roundSelector">@drawable/round_selector</item>
<item name="rectSelector">@drawable/rect_selector</item>
<item name="rectSelectorStrong">@drawable/rect_selector_strong</item>
</style>
</resources>

View file

@ -26,7 +26,7 @@
<color name="blackColorOnPrimary">#ffffff</color>
<color name="blackColorSecondary">#000000</color>
<color name="blackColorBackground">#000000</color>
<color name="blackColorSurface">#17181a</color>
<color name="blackColorSurface">#000000</color>
<color name="transparent">#00000000</color>
<!-- card colors -->

View file

@ -2,7 +2,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.RetroMusic.Base.Adaptive" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="md_font_title">@font/circular</item>
<item name="md_font_body">@font/circular</item>
<item name="md_font_button">@font/circular</item>
@ -24,27 +23,16 @@
</style>
<style name="Theme.RetroMusic.Base" parent="Theme.MaterialComponents.NoActionBar">
<item name="md_font_title">@font/circular</item>
<item name="md_font_body">@font/circular</item>
<item name="md_font_button">@font/circular</item>
<item name="md_color_button_text">@color/md_white_1000</item>
<item name="md_background_color">@color/dark_color</item>
<item name="md_background_color">@color/darkColorPrimary</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="windowActionBarOverlay">true</item>
<item name="roundSelector">@drawable/round_selector_dark</item>
<item name="rectSelector">@drawable/rect_selector_dark</item>
<item name="rectSelectorStrong">@drawable/rect_selector_strong_dark</item>
<item name="cardBackgroundColor">@color/card_dark_color</item>
<item name="defaultFooterColor">@color/dark_color</item>
<item name="dividerColor">@color/md_grey_800</item>
<item name="iconColor">@color/ate_secondary_text_dark</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat</item>
<!-- necessary to find the overflow button later in the layout-->
@ -59,54 +47,31 @@
<item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
<item name="colorPrimary">@color/darkColorPrimary</item>
<item name="colorSecondary">@color/darkColorSecondary</item>
<item name="colorPrimaryVariant">@color/darkColorPrimary</item>
<item name="colorOnPrimary">@color/mi_text_color_primary_dark</item>
<item name="colorOnSecondary">@color/mi_text_color_secondary_dark</item>
<item name="colorAccent">@color/md_deep_purple_A200</item>
<!-- just in case-->
<item name="android:windowBackground">@color/darkColorSurface</item>
<item name="android:colorBackground">@color/darkColorSurface</item>
<item name="colorSurface">@color/darkColorSurface</item>
<item name="colorOnSurface">@color/mi_text_color_primary_dark</item>
<item name="colorOnBackground">@color/mi_text_color_secondary_dark</item>
<item name="colorControlNormal">@color/md_white_1000</item>
</style>
<style name="Theme.RetroMusic.Base.Black" parent="@style/Theme.RetroMusic.Base">
<style name="Theme.RetroMusic.Base.Black" parent="Theme.MaterialComponents.NoActionBar">
<item name="dividerColor">@color/dark_color</item>
<item name="defaultFooterColor">@color/md_grey_800</item>
<item name="cardBackgroundColor">@color/black_color</item>
<item name="md_background_color">@color/black_color</item>
<item name="md_font_title">@font/circular</item>
<item name="md_font_body">@font/circular</item>
<item name="md_font_button">@font/circular</item>
<item name="md_background_color">@color/blackColorSurface</item>
<item name="android:windowBackground">@color/black_color</item>
<item name="roundSelector">@drawable/round_selector</item>
<item name="rectSelector">@drawable/rect_selector</item>
<item name="rectSelectorStrong">@drawable/rect_selector_strong</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="android:windowActivityTransitions">true</item>
<item name="android:fontFamily">@font/circular</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/blackColorPrimary</item>
<item name="colorOnPrimary">@color/mi_text_color_primary_dark</item>
<item name="colorPrimaryVariant">@color/blackColorPrimary</item>
<item name="colorSecondary">@color/blackColorSecondary</item>
<item name="colorOnSecondary">@color/mi_text_color_secondary_dark</item>
<item name="colorSecondaryVariant">@color/md_green_A700</item>
<item name="colorAccent">@color/md_deep_purple_A200</item>
<item name="colorControlNormal">@color/md_white_1000</item>
<item name="android:colorBackground">@color/blackColorBackground</item>
<item name="colorOnBackground">@color/mi_text_color_secondary_dark</item>
<item name="windowActionBarOverlay">true</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
<item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
<item name="colorSurface">@color/blackColorSurface</item>
<item name="colorOnSurface">@color/mi_text_color_primary_dark</item>
<item name="colorOnBackground">@color/blackColorSurface</item>
</style>
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">