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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -307,7 +307,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
cab = new MaterialCab(getMainActivity(), R.id.cab_stub) cab = new MaterialCab(getMainActivity(), R.id.cab_stub)
.setMenu(menuRes) .setMenu(menuRes)
.setCloseDrawableRes(R.drawable.ic_close_white_24dp) .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); .start(callback);
return cab; return cab;
} }

View file

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

View file

@ -143,9 +143,9 @@ class AdaptiveFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Call
playerToolbar.apply { playerToolbar.apply {
inflateMenu(R.menu.menu_player) inflateMenu(R.menu.menu_player)
setNavigationOnClickListener { requireActivity().onBackPressed() } setNavigationOnClickListener { requireActivity().onBackPressed() }
ToolbarContentTintHelper.colorizeToolbar(this, primaryColor, activity) ToolbarContentTintHelper.colorizeToolbar(this, primaryColor, requireActivity())
setTitleTextColor(primaryColor) setTitleTextColor(primaryColor)
setSubtitleTextColor(ThemeStore.textColorSecondary(context!!)) setSubtitleTextColor(ThemeStore.textColorSecondary(requireContext()))
setOnMenuItemClickListener(this@AdaptiveFragment) setOnMenuItemClickListener(this@AdaptiveFragment)
} }
} }
@ -183,8 +183,8 @@ class AdaptiveFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Call
override fun onColorChanged(color: Int) { override fun onColorChanged(color: Int) {
playbackControlsFragment.setDark(color) playbackControlsFragment.setDark(color)
lastColor = 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())
} }
override fun onShow() { override fun onShow() {
@ -201,7 +201,7 @@ class AdaptiveFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Call
} }
override fun toolbarIconColor(): Int { override fun toolbarIconColor(): Int {
return ATHUtil.resolveColor(context, R.attr.iconColor) return ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal)
} }
override val paletteColor: Int 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.ATHUtil
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R 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.base.AbsPlayerFragment
import code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment 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.* import kotlinx.android.synthetic.main.fragment_fit.*
@ -40,15 +40,15 @@ class FitFragment : AbsPlayerFragment() {
} }
override fun toolbarIconColor(): Int { override fun toolbarIconColor(): Int {
return ATHUtil.resolveColor(context, R.attr.iconColor) return ATHUtil.resolveColor(context, R.attr.colorControlNormal)
} }
override fun onColorChanged(color: Int) { override fun onColorChanged(color: Int) {
playbackControlsFragment.setDark(color) playbackControlsFragment.setDark(color)
lastColor = 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() { private fun setUpPlayerToolbar() {
playerToolbar!!.apply { playerToolbar.apply {
inflateMenu(R.menu.menu_player) inflateMenu(R.menu.menu_player)
setNavigationOnClickListener { activity!!.onBackPressed() } setNavigationOnClickListener { requireActivity().onBackPressed() }
setOnMenuItemClickListener(this@FitFragment) 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() { private fun setUpPlayerToolbar() {
playerToolbar.inflateMenu(R.menu.menu_player) playerToolbar.inflateMenu(R.menu.menu_player)
playerToolbar.setNavigationOnClickListener { _ -> activity!!.onBackPressed() } playerToolbar.setNavigationOnClickListener { _ -> requireActivity().onBackPressed() }
playerToolbar.setOnMenuItemClickListener(this) playerToolbar.setOnMenuItemClickListener(this)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(context, ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(context, R.attr.iconColor), requireActivity())
R.attr.iconColor), activity)
} }
private fun colorize(i: Int) { private fun colorize(i: Int) {
@ -90,24 +89,21 @@ class FlatPlayerFragment : AbsPlayerFragment() {
override fun toolbarIconColor(): Int { override fun toolbarIconColor(): Int {
val isLight = ColorUtil.isColorLight(paletteColor) val isLight = ColorUtil.isColorLight(paletteColor)
return if (PreferenceUtil.getInstance(requireContext()).adaptiveColor) return if (PreferenceUtil.getInstance(requireContext()).adaptiveColor)
MaterialValueHelper.getPrimaryTextColor(context, isLight) MaterialValueHelper.getPrimaryTextColor(requireContext(), isLight)
else else
ATHUtil.resolveColor(context, R.attr.iconColor) ATHUtil.resolveColor(context, R.attr.colorControlNormal)
} }
override fun onColorChanged(color: Int) { override fun onColorChanged(color: Int) {
lastColor = color lastColor = color
flatPlaybackControlsFragment.setDark(color) flatPlaybackControlsFragment.setDark(color)
callbacks!!.onPaletteColorChanged() callbacks?.onPaletteColorChanged()
val isLight = ColorUtil.isColorLight(color) val isLight = ColorUtil.isColorLight(color)
//TransitionManager.beginDelayedTransition(mToolbar);
val iconColor = if (PreferenceUtil.getInstance(requireContext()).adaptiveColor) val iconColor = if (PreferenceUtil.getInstance(requireContext()).adaptiveColor)
MaterialValueHelper.getPrimaryTextColor(context!!, isLight) MaterialValueHelper.getPrimaryTextColor(requireContext(), isLight)
else else
ATHUtil.resolveColor(context!!, R.attr.iconColor) ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, iconColor, activity) ToolbarContentTintHelper.colorizeToolbar(playerToolbar, iconColor, requireActivity())
if (PreferenceUtil.getInstance(requireContext()).adaptiveColor) { if (PreferenceUtil.getInstance(requireContext()).adaptiveColor) {
colorize(color) colorize(color)
} }

View file

@ -44,7 +44,7 @@ class MaterialFragment : AbsPlayerFragment() {
} }
override fun toolbarIconColor(): Int { override fun toolbarIconColor(): Int {
return ATHUtil.resolveColor(requireContext(), R.attr.iconColor) return ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal)
} }
override fun onColorChanged(color: Int) { override fun onColorChanged(color: Int) {
@ -52,7 +52,7 @@ class MaterialFragment : AbsPlayerFragment() {
lastColor = color lastColor = color
callbacks?.onPaletteColorChanged() 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) { override fun toggleFavorite(song: Song) {
@ -89,7 +89,7 @@ class MaterialFragment : AbsPlayerFragment() {
inflateMenu(R.menu.menu_player) inflateMenu(R.menu.menu_player)
setNavigationOnClickListener { requireActivity().onBackPressed() } setNavigationOnClickListener { requireActivity().onBackPressed() }
setOnMenuItemClickListener(this@MaterialFragment) 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.ArgbEvaluator
import android.animation.ValueAnimator import android.animation.ValueAnimator
import android.graphics.drawable.GradientDrawable import android.graphics.drawable.GradientDrawable
import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
@ -34,15 +33,19 @@ class PlayerFragment : AbsPlayerFragment() {
private fun colorize(i: Int) { private fun colorize(i: Int) {
if (valueAnimator != null) { if (valueAnimator != null) {
valueAnimator!!.cancel() valueAnimator?.cancel()
} }
valueAnimator = ValueAnimator.ofObject(ArgbEvaluator(), android.R.color.transparent, i) valueAnimator = ValueAnimator.ofObject(ArgbEvaluator(), ATHUtil.resolveColor(requireContext(), R.attr.colorSurface), i)
valueAnimator!!.addUpdateListener { animation -> valueAnimator?.addUpdateListener { animation ->
val drawable = DrawableGradient(GradientDrawable.Orientation.TOP_BOTTOM, intArrayOf(animation.animatedValue as Int, android.R.color.transparent), 0) if (isAdded) {
val drawable = DrawableGradient(GradientDrawable.Orientation.TOP_BOTTOM,
intArrayOf(animation.animatedValue as Int,
ATHUtil.resolveColor(requireContext(), R.attr.colorSurface)), 0)
colorGradientBackground?.background = drawable colorGradientBackground?.background = drawable
} }
valueAnimator!!.setDuration(ViewUtil.RETRO_MUSIC_ANIM_TIME.toLong()).start() }
valueAnimator?.setDuration(ViewUtil.RETRO_MUSIC_ANIM_TIME.toLong())?.start()
} }
override fun onShow() { override fun onShow() {
@ -59,25 +62,21 @@ class PlayerFragment : AbsPlayerFragment() {
} }
override fun toolbarIconColor(): Int { override fun toolbarIconColor(): Int {
return ATHUtil.resolveColor(context, R.attr.iconColor) return ATHUtil.resolveColor(context, R.attr.colorControlNormal)
} }
override fun onColorChanged(color: Int) { override fun onColorChanged(color: Int) {
playbackControlsFragment.setDark(color) playbackControlsFragment.setDark(color)
lastColor = 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) { if (PreferenceUtil.getInstance(requireContext()).adaptiveColor) {
colorize(color) 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) { override fun toggleFavorite(song: Song) {
super.toggleFavorite(song) super.toggleFavorite(song)
if (song.id == MusicPlayerRemote.currentSong.id) { if (song.id == MusicPlayerRemote.currentSong.id) {

View file

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

View file

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

View file

@ -42,7 +42,7 @@ class BottomNavigationBarTinted @JvmOverloads constructor(
val accentColor = ThemeStore.accentColor(context) val accentColor = ThemeStore.accentColor(context)
NavigationViewUtil.setItemIconColors(this, ColorUtil.withAlpha(iconColor, 0.5f), accentColor) NavigationViewUtil.setItemIconColors(this, ColorUtil.withAlpha(iconColor, 0.5f), accentColor)
NavigationViewUtil.setItemTextColors(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) setOnApplyWindowInsetsListener(null)
//itemRippleColor = ColorStateList.valueOf(accentColor) //itemRippleColor = ColorStateList.valueOf(accentColor)
backgroundTintList = ColorStateList.valueOf(ATHUtil.resolveColor(context, android.R.attr.windowBackground)) backgroundTintList = ColorStateList.valueOf(ATHUtil.resolveColor(context, android.R.attr.windowBackground))

View file

@ -1,6 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<corners android:radius="8dp" /> <solid android:color="?colorSurface" />
<solid android:color="?android:attr/windowBackground" />
</shape> </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

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"> android:shape="oval">
<solid android:color="@color/ripple_material_light"/> <solid android:color="@color/ripple_material_light" />
</shape> </shape>

View file

@ -17,60 +17,9 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical"> 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 <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -78,38 +27,6 @@
<include layout="@layout/status_bar" /> <include layout="@layout/status_bar" />
</FrameLayout> </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 <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -118,14 +35,110 @@
app:behavior_overlapTop="72dp" app:behavior_overlapTop="72dp"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"> 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 <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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:cardCornerRadius="16dp" android:scaleType="centerCrop"
app:cardElevation="8dp"> 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" /> <include layout="@layout/home_content" />
</com.google.android.material.card.MaterialCardView> </LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout> </LinearLayout>

View file

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

View file

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

View file

@ -17,6 +17,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical"> android:orientation="vertical">
<FrameLayout <FrameLayout
@ -76,7 +77,56 @@
android:layout_marginEnd="@dimen/toolbar_margin_horizontal" android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"> 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.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout> </LinearLayout>

View file

@ -7,6 +7,11 @@
android:clickable="true" android:clickable="true"
android:focusable="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" /> <include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout <LinearLayout

View file

@ -7,6 +7,11 @@
android:clickable="true" android:clickable="true"
android:focusable="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" /> <include layout="@layout/shadow_statusbar_toolbar" />

View file

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

View file

@ -8,6 +8,13 @@
android:focusable="true" android:focusable="true"
android:orientation="vertical"> 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 <View
android:id="@+id/gradient_background" android:id="@+id/gradient_background"
android:layout_width="match_parent" android:layout_width="match_parent"

View file

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

View file

@ -17,6 +17,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_fragment_content" android:id="@+id/main_fragment_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:background="?attr/colorSurface"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
@ -76,8 +77,56 @@
android:layout_marginEnd="@dimen/toolbar_margin_horizontal" android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"> app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<include layout="@layout/home_content" /> <androidx.constraintlayout.widget.ConstraintLayout
</androidx.core.widget.NestedScrollView> 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> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout> </LinearLayout>

View file

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

View file

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

View file

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

View file

@ -18,6 +18,7 @@
android:id="@+id/main_fragment_content" android:id="@+id/main_fragment_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical"> android:orientation="vertical">
<FrameLayout <FrameLayout
@ -78,7 +79,56 @@
android:layout_weight="1" android:layout_weight="1"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"> 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.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout> </LinearLayout>

View file

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

View file

@ -1,8 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" 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 <com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout" android:id="@+id/appBarLayout"
@ -27,4 +42,5 @@
<include layout="@layout/activity_about_content" /> <include layout="@layout/activity_about_content" />
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -1,12 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical"> 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 <com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -59,4 +70,5 @@
android:layout_gravity="bottom|end" android:layout_gravity="bottom|end"
android:layout_margin="16dp" android:layout_margin="16dp"
app:srcCompat="@drawable/ic_send_white_24dp" /> app:srcCompat="@drawable/ic_send_white_24dp" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -1,9 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" 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 <com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout" android:id="@+id/appBarLayout"
@ -34,4 +47,5 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -1,16 +1,31 @@
<?xml version="1.0" encoding="utf-8"?> <?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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="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 <com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout" android:id="@+id/appBarLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp"
app:liftOnScroll="true"> app:liftOnScroll="true">
<com.google.android.material.appbar.CollapsingToolbarLayout <com.google.android.material.appbar.CollapsingToolbarLayout
@ -74,4 +89,5 @@
app:icon="@drawable/ic_clear_all_black_24dp" /> app:icon="@drawable/ic_clear_all_black_24dp" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

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

View file

@ -1,9 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" 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 <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -31,5 +44,6 @@
tools:title="@string/action_settings" /> tools:title="@string/action_settings" />
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -1,10 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="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 <com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout" android:id="@+id/appBarLayout"
@ -36,4 +49,5 @@
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" /> app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -2,14 +2,16 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" 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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:clickable="true" android:background="?attr/colorSurface" />
android:focusable="true">
<include layout="@layout/shadow_statusbar_toolbar" /> <include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="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. ~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details. ~ See the GNU General Public License for more details.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:background="?attr/colorSurface"
<com.google.android.material.appbar.AppBarLayout android:orientation="vertical">
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">
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -49,11 +26,6 @@
<include layout="@layout/status_bar" /> <include layout="@layout/status_bar" />
</FrameLayout> </FrameLayout>
</LinearLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -165,4 +137,4 @@
<include layout="@layout/home_content" /> <include layout="@layout/home_content" />
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </LinearLayout>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -17,6 +17,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical"> android:orientation="vertical">
<FrameLayout <FrameLayout
@ -71,7 +72,56 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"> 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.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout> </LinearLayout>

View file

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

View file

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

View file

@ -7,6 +7,11 @@
android:clickable="true" android:clickable="true"
android:focusable="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" /> <include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout <LinearLayout

View file

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

View file

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

View file

@ -21,6 +21,14 @@
android:focusable="true" android:focusable="true"
android:orientation="vertical"> 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 <FrameLayout
android:id="@+id/toolbarContainer" android:id="@+id/toolbarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -91,7 +99,7 @@
android:ellipsize="end" android:ellipsize="end"
android:maxLines="2" android:maxLines="2"
android:textAppearance="@style/TextViewBody2" android:textAppearance="@style/TextViewBody2"
android:textColor="?attr/colorOnSecondary" android:textColor="?android:attr/textColorSecondary"
app:layout_constraintBottom_toBottomOf="@+id/imageContainer" app:layout_constraintBottom_toBottomOf="@+id/imageContainer"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageContainer" app:layout_constraintStart_toEndOf="@+id/imageContainer"
@ -111,4 +119,5 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:layout="@layout/fragment_peak_control_player" /> tools:layout="@layout/fragment_peak_control_player" />
</FrameLayout> </FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

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

View file

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

View file

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

View file

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

View file

@ -8,6 +8,13 @@
android:focusable="true" android:focusable="true"
android:orientation="vertical"> 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" /> <include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout <LinearLayout

View file

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

View file

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

View file

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

View file

@ -10,15 +10,16 @@
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/title" android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="16dp" android:padding="16dp"
android:textAppearance="@style/TextViewHeadline6" android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold" android:textStyle="bold"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/full_names" /> tools:text="@tools:sample/lorem" />
<androidx.recyclerview.widget.RecyclerView <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="blackColorOnPrimary">#ffffff</color>
<color name="blackColorSecondary">#000000</color> <color name="blackColorSecondary">#000000</color>
<color name="blackColorBackground">#000000</color> <color name="blackColorBackground">#000000</color>
<color name="blackColorSurface">#17181a</color> <color name="blackColorSurface">#000000</color>
<color name="transparent">#00000000</color> <color name="transparent">#00000000</color>
<!-- card colors --> <!-- card colors -->

View file

@ -2,7 +2,6 @@
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.RetroMusic.Base.Adaptive" parent="Theme.MaterialComponents.DayNight.NoActionBar"> <style name="Theme.RetroMusic.Base.Adaptive" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="md_font_title">@font/circular</item> <item name="md_font_title">@font/circular</item>
<item name="md_font_body">@font/circular</item> <item name="md_font_body">@font/circular</item>
<item name="md_font_button">@font/circular</item> <item name="md_font_button">@font/circular</item>
@ -24,27 +23,16 @@
</style> </style>
<style name="Theme.RetroMusic.Base" parent="Theme.MaterialComponents.NoActionBar"> <style name="Theme.RetroMusic.Base" parent="Theme.MaterialComponents.NoActionBar">
<item name="md_font_title">@font/circular</item> <item name="md_font_title">@font/circular</item>
<item name="md_font_body">@font/circular</item> <item name="md_font_body">@font/circular</item>
<item name="md_font_button">@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_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="android:windowActionBarOverlay">true</item>
<item name="windowActionBarOverlay">true</item> <item name="windowActionBarOverlay">true</item>
<item name="roundSelector">@drawable/round_selector_dark</item> <item name="roundSelector">@drawable/round_selector_dark</item>
<item name="rectSelector">@drawable/rect_selector_dark</item> <item name="rectSelector">@drawable/rect_selector_dark</item>
<item name="rectSelectorStrong">@drawable/rect_selector_strong_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> <item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat</item>
<!-- necessary to find the overflow button later in the layout--> <!-- necessary to find the overflow button later in the layout-->
@ -59,54 +47,31 @@
<item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item> <item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
<item name="materialButtonStyle">@style/MaterialButtonTheme</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>
<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="md_font_title">@font/circular</item>
<item name="defaultFooterColor">@color/md_grey_800</item> <item name="md_font_body">@font/circular</item>
<item name="cardBackgroundColor">@color/black_color</item> <item name="md_font_button">@font/circular</item>
<item name="md_background_color">@color/black_color</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:windowActivityTransitions">true</item>
<item name="android:fontFamily">@font/circular</item> <item name="android:fontFamily">@font/circular</item>
<item name="windowActionBar">false</item> <item name="windowActionBarOverlay">true</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</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="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
<item name="colorSurface">@color/blackColorSurface</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>
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar"> <style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">