Ripple cover and color adjustment

This commit is contained in:
h4h13 2019-12-10 23:06:20 +05:30
commit 8dc9083ff7
50 changed files with 485 additions and 675 deletions

View file

@ -44,7 +44,6 @@ import com.afollestad.materialcab.MaterialCab
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import kotlinx.android.synthetic.main.activity_album.* import kotlinx.android.synthetic.main.activity_album.*
import kotlinx.android.synthetic.main.activity_album_content.* import kotlinx.android.synthetic.main.activity_album_content.*
import kotlinx.android.synthetic.main.status_bar.*
import java.util.* import java.util.*
import javax.inject.Inject import javax.inject.Inject
import android.util.Pair as UtilPair import android.util.Pair as UtilPair
@ -203,7 +202,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
MaterialUtil.setTint(button = playAction, color = buttonColor) MaterialUtil.setTint(button = playAction, color = buttonColor)
val toolbarColor = ATHUtil.resolveColor(this, R.attr.colorSurface) val toolbarColor = ATHUtil.resolveColor(this, R.attr.colorSurface)
status_bar.setBackgroundColor(toolbarColor) //status_bar.setBackgroundColor(toolbarColor)
toolbar.setBackgroundColor(toolbarColor) toolbar.setBackgroundColor(toolbarColor)
setSupportActionBar(toolbar) setSupportActionBar(toolbar)
supportActionBar?.title = null supportActionBar?.title = null
@ -266,14 +265,10 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
private fun setUpSortOrderMenu(sortOrder: SubMenu) { private fun setUpSortOrderMenu(sortOrder: SubMenu) {
when (savedSortOrder) { when (savedSortOrder) {
AlbumSongSortOrder.SONG_A_Z -> sortOrder.findItem(R.id.action_sort_order_title) AlbumSongSortOrder.SONG_A_Z -> sortOrder.findItem(R.id.action_sort_order_title).isChecked = true
.isChecked = true AlbumSongSortOrder.SONG_Z_A -> sortOrder.findItem(R.id.action_sort_order_title_desc).isChecked = true
AlbumSongSortOrder.SONG_Z_A -> sortOrder.findItem(R.id.action_sort_order_title_desc) AlbumSongSortOrder.SONG_TRACK_LIST -> sortOrder.findItem(R.id.action_sort_order_track_list).isChecked = true
.isChecked = true AlbumSongSortOrder.SONG_DURATION -> sortOrder.findItem(R.id.action_sort_order_artist_song_duration).isChecked = true
AlbumSongSortOrder.SONG_TRACK_LIST -> sortOrder.findItem(R.id.action_sort_order_track_list)
.isChecked = true
AlbumSongSortOrder.SONG_DURATION -> sortOrder.findItem(R.id.action_sort_order_artist_song_duration)
.isChecked = true
} }
} }

View file

@ -38,7 +38,6 @@ import com.afollestad.materialcab.MaterialCab
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import kotlinx.android.synthetic.main.activity_artist_content.* import kotlinx.android.synthetic.main.activity_artist_content.*
import kotlinx.android.synthetic.main.activity_artist_details.* import kotlinx.android.synthetic.main.activity_artist_details.*
import kotlinx.android.synthetic.main.status_bar.*
import java.util.* import java.util.*
import javax.inject.Inject import javax.inject.Inject
import kotlin.collections.ArrayList import kotlin.collections.ArrayList
@ -243,7 +242,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
MaterialUtil.setTint(button = playAction, color = buttonColor) MaterialUtil.setTint(button = playAction, color = buttonColor)
val toolbarColor = ATHUtil.resolveColor(this, R.attr.colorSurface) val toolbarColor = ATHUtil.resolveColor(this, R.attr.colorSurface)
status_bar.setBackgroundColor(toolbarColor) //status_bar.setBackgroundColor(toolbarColor)
toolbar.setBackgroundColor(toolbarColor) toolbar.setBackgroundColor(toolbarColor)
setSupportActionBar(toolbar) setSupportActionBar(toolbar)
supportActionBar?.title = null supportActionBar?.title = null

View file

@ -90,7 +90,7 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
val statusBar = window.decorView.rootView.findViewById<View>(R.id.status_bar) val statusBar = window.decorView.rootView.findViewById<View>(R.id.status_bar)
if (statusBar != null) { if (statusBar != null) {
when { when {
VersionUtils.hasMarshmallow() -> window.statusBarColor = color VersionUtils.hasMarshmallow() -> statusBar.setBackgroundColor(color)
VersionUtils.hasLollipop() -> statusBar.setBackgroundColor(ColorUtil.darkenColor(color)) VersionUtils.hasLollipop() -> statusBar.setBackgroundColor(ColorUtil.darkenColor(color))
else -> statusBar.setBackgroundColor(color) else -> statusBar.setBackgroundColor(color)
} }
@ -105,7 +105,7 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
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, R.attr.colorSurface))
setLightStatusbarAuto(ATHUtil.resolveColor(this, R.attr.colorSurface)) setLightStatusbarAuto(ATHUtil.resolveColor(this, R.attr.colorSurface))
} }

View file

@ -3,17 +3,27 @@ package code.name.monkey.retromusic.adapter.album
import android.app.ActivityOptions import android.app.ActivityOptions
import android.content.res.ColorStateList import android.content.res.ColorStateList
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.view.* import android.view.LayoutInflater
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import code.name.monkey.appthemehelper.util.* import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.adapter.base.* import code.name.monkey.retromusic.adapter.base.AbsMultiSelectAdapter
import code.name.monkey.retromusic.glide.* import code.name.monkey.retromusic.adapter.base.MediaEntryViewHolder
import code.name.monkey.retromusic.helper.* import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
import code.name.monkey.retromusic.glide.SongGlideRequest
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.helper.SortOrder
import code.name.monkey.retromusic.helper.menu.SongsMenuHelper import code.name.monkey.retromusic.helper.menu.SongsMenuHelper
import code.name.monkey.retromusic.interfaces.CabHolder import code.name.monkey.retromusic.interfaces.CabHolder
import code.name.monkey.retromusic.model.* import code.name.monkey.retromusic.model.Album
import code.name.monkey.retromusic.util.* import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.NavigationUtil
import code.name.monkey.retromusic.util.PreferenceUtil
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
@ -24,7 +34,9 @@ open class AlbumAdapter(
usePalette: Boolean, usePalette: Boolean,
cabHolder: CabHolder? cabHolder: CabHolder?
) : AbsMultiSelectAdapter<AlbumAdapter.ViewHolder, Album>( ) : AbsMultiSelectAdapter<AlbumAdapter.ViewHolder, Album>(
activity, cabHolder, code.name.monkey.retromusic.R.menu.menu_media_selection activity,
cabHolder,
R.menu.menu_media_selection
), FastScrollRecyclerView.SectionedAdapter { ), FastScrollRecyclerView.SectionedAdapter {
var dataSet: ArrayList<Album> var dataSet: ArrayList<Album>
protected set protected set
@ -75,31 +87,16 @@ open class AlbumAdapter(
holder.itemView.isActivated = isChecked holder.itemView.isActivated = isChecked
holder.title?.text = getAlbumTitle(album) holder.title?.text = getAlbumTitle(album)
holder.text?.text = getAlbumText(album) holder.text?.text = getAlbumText(album)
holder.playSongs?.setOnClickListener { holder.playSongs?.setOnClickListener { album.songs?.let { songs -> MusicPlayerRemote.openQueue(songs, 0, true) } }
album.songs?.let { songs ->
MusicPlayerRemote.openQueue(
songs, 0, true
)
}
}
loadAlbumCover(album, holder) loadAlbumCover(album, holder)
} }
protected open fun setColors(color: Int, holder: ViewHolder) { protected open fun setColors(color: Int, holder: ViewHolder) {
if (holder.paletteColorContainer != null) { if (holder.paletteColorContainer != null) {
holder.title?.setTextColor( holder.title?.setTextColor(MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(color)))
MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(color)) holder.text?.setTextColor(MaterialValueHelper.getSecondaryTextColor(activity, ColorUtil.isColorLight(color)))
)
holder.text?.setTextColor(
MaterialValueHelper.getSecondaryTextColor(
activity, ColorUtil.isColorLight(
color
)
)
)
holder.paletteColorContainer?.setBackgroundColor(color) holder.paletteColorContainer?.setBackgroundColor(color)
} }
holder.mask?.backgroundTintList = ColorStateList.valueOf(color) holder.mask?.backgroundTintList = ColorStateList.valueOf(color)
} }

View file

@ -1,10 +1,13 @@
package code.name.monkey.retromusic.adapter.album package code.name.monkey.retromusic.adapter.album
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.view.* import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import code.name.monkey.appthemehelper.util.* import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.retromusic.glide.* import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
import code.name.monkey.retromusic.glide.SongGlideRequest
import code.name.monkey.retromusic.helper.HorizontalAdapterHelper import code.name.monkey.retromusic.helper.HorizontalAdapterHelper
import code.name.monkey.retromusic.interfaces.CabHolder import code.name.monkey.retromusic.interfaces.CabHolder
import code.name.monkey.retromusic.model.Album import code.name.monkey.retromusic.model.Album
@ -28,22 +31,8 @@ class HorizontalAlbumAdapter(
} }
override fun setColors(color: Int, holder: ViewHolder) { override fun setColors(color: Int, holder: ViewHolder) {
holder.title?.setTextColor( holder.title?.setTextColor(MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(color)))
MaterialValueHelper.getPrimaryTextColor( holder.text?.setTextColor(MaterialValueHelper.getSecondaryTextColor(activity, ColorUtil.isColorLight(color)))
activity,
ColorUtil.isColorLight(
color
)
)
)
holder.text?.setTextColor(
MaterialValueHelper.getSecondaryTextColor(
activity,
ColorUtil.isColorLight(
color
)
)
)
} }
override fun loadAlbumCover(album: Album, holder: ViewHolder) { override fun loadAlbumCover(album: Album, holder: ViewHolder) {

View file

@ -65,7 +65,7 @@ open class AlbumsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Al
} }
override fun setUsePalette(usePalette: Boolean) { override fun setUsePalette(usePalette: Boolean) {
adapter!!.usePalette(usePalette) adapter?.usePalette(usePalette)
} }
override fun setGridSize(gridSize: Int) { override fun setGridSize(gridSize: Int) {

View file

@ -16,6 +16,7 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.webkit.MimeTypeMap; import android.webkit.MimeTypeMap;
import android.widget.PopupMenu; import android.widget.PopupMenu;
import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@ -47,7 +48,6 @@ import java.util.Objects;
import code.name.monkey.appthemehelper.ThemeStore; import code.name.monkey.appthemehelper.ThemeStore;
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.ATHUtil;
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.R; import code.name.monkey.retromusic.R;
import code.name.monkey.retromusic.adapter.SongFileAdapter; import code.name.monkey.retromusic.adapter.SongFileAdapter;
@ -87,15 +87,11 @@ public class FoldersFragment extends AbsMainActivityFragment implements
private static final int LOADER_ID = LoaderIds.Companion.getFOLDERS_FRAGMENT(); private static final int LOADER_ID = LoaderIds.Companion.getFOLDERS_FRAGMENT();
private View coordinatorLayout, empty; private View coordinatorLayout, empty;
private TextView emojiText;
private MaterialCardView toolbarContainer; private MaterialCardView toolbarContainer;
private Toolbar toolbar; private Toolbar toolbar;
private BreadCrumbLayout breadCrumbs; private BreadCrumbLayout breadCrumbs;
private AppBarLayout appBarLayout; private AppBarLayout appBarLayout;
private FastScrollRecyclerView recyclerView; private FastScrollRecyclerView recyclerView;
private Comparator<File> fileComparator = (lhs, rhs) -> { private Comparator<File> fileComparator = (lhs, rhs) -> {
@ -151,6 +147,10 @@ public class FoldersFragment extends AbsMainActivityFragment implements
} }
} }
private String getEmojiByUnicode(int unicode) {
return new String(Character.toChars(unicode));
}
private void initViews(View view) { private void initViews(View view) {
coordinatorLayout = view.findViewById(R.id.coordinatorLayout); coordinatorLayout = view.findViewById(R.id.coordinatorLayout);
toolbarContainer = view.findViewById(R.id.toolbarContainer); toolbarContainer = view.findViewById(R.id.toolbarContainer);
@ -159,6 +159,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
breadCrumbs = view.findViewById(R.id.breadCrumbs); breadCrumbs = view.findViewById(R.id.breadCrumbs);
toolbar = view.findViewById(R.id.toolbar); toolbar = view.findViewById(R.id.toolbar);
empty = view.findViewById(android.R.id.empty); empty = view.findViewById(android.R.id.empty);
emojiText = view.findViewById(R.id.emptyEmoji);
} }
private void setCrumb(BreadCrumbLayout.Crumb crumb, boolean addToHistory) { private void setCrumb(BreadCrumbLayout.Crumb crumb, boolean addToHistory) {
@ -232,13 +233,14 @@ public class FoldersFragment extends AbsMainActivityFragment implements
private void setUpAppbarColor() { private void setUpAppbarColor() {
int primaryColor = ATHUtil.INSTANCE.resolveColor(requireContext(), R.attr.colorSurface); int primaryColor = ATHUtil.INSTANCE.resolveColor(requireContext(), R.attr.colorSurface);
getMainActivity().setSupportActionBar(toolbar); getMainActivity().setSupportActionBar(toolbar);
toolbar.setBackgroundTintList(ColorStateList.valueOf(ATHUtil.INSTANCE.resolveColor(requireContext(), R.attr.colorSurface))); toolbar.setBackgroundTintList(ColorStateList.valueOf(primaryColor));
toolbarContainer.setCardBackgroundColor(ColorStateList.valueOf(primaryColor));
toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp); toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp);
toolbar.setNavigationOnClickListener(v -> { toolbar.setNavigationOnClickListener(v -> {
showMainMenu(OptionsSheetDialogFragment.FOLDER); showMainMenu(OptionsSheetDialogFragment.FOLDER);
}); });
breadCrumbs.setActivatedContentColor(ToolbarContentTintHelper.toolbarTitleColor(requireActivity(), ColorUtil.INSTANCE.darkenColor(primaryColor))); breadCrumbs.setActivatedContentColor(ATHUtil.INSTANCE.resolveColor(requireContext(), android.R.attr.textColorPrimary));
breadCrumbs.setDeactivatedContentColor(ToolbarContentTintHelper.toolbarSubtitleColor(requireActivity(), ColorUtil.INSTANCE.darkenColor(primaryColor))); breadCrumbs.setDeactivatedContentColor(ATHUtil.INSTANCE.resolveColor(requireContext(), android.R.attr.textColorSecondary));
appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> getMainActivity().setLightStatusbar(!ATHUtil.INSTANCE.isWindowBackgroundDark(requireContext()))); appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> getMainActivity().setLightStatusbar(!ATHUtil.INSTANCE.isWindowBackgroundDark(requireContext())));
toolbar.setOnClickListener(v -> { toolbar.setOnClickListener(v -> {
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(getMainActivity(), toolbarContainer, getString(R.string.transition_toolbar)); ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(getMainActivity(), toolbarContainer, getString(R.string.transition_toolbar));
@ -470,6 +472,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
} }
private void checkIsEmpty() { private void checkIsEmpty() {
emojiText.setText(getEmojiByUnicode(0x1F631));
if (empty != null) { if (empty != null) {
empty.setVisibility(adapter == null || adapter.getItemCount() == 0 ? View.VISIBLE : View.GONE); empty.setVisibility(adapter == null || adapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);
} }
@ -491,8 +494,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
adapter.swapDataSet(files); adapter.swapDataSet(files);
BreadCrumbLayout.Crumb crumb = getActiveCrumb(); BreadCrumbLayout.Crumb crumb = getActiveCrumb();
if (crumb != null && recyclerView != null) { if (crumb != null && recyclerView != null) {
((LinearLayoutManager) recyclerView.getLayoutManager()) ((LinearLayoutManager) recyclerView.getLayoutManager()).scrollToPositionWithOffset(crumb.getScrollPosition(), 0);
.scrollToPositionWithOffset(crumb.getScrollPosition(), 0);
} }
} }

View file

@ -28,10 +28,10 @@ import com.bumptech.glide.request.animation.GlideAnimation
abstract class RetroMusicColoredTarget(view: ImageView) : BitmapPaletteTarget(view) { abstract class RetroMusicColoredTarget(view: ImageView) : BitmapPaletteTarget(view) {
protected val defaultFooterColor: Int protected val defaultFooterColor: Int
get() = ATHUtil.resolveColor(getView().context, R.attr.defaultFooterColor) get() = ATHUtil.resolveColor(getView().context, R.attr.colorSurface)
protected val albumArtistFooterColor: Int protected val albumArtistFooterColor: Int
get() = ATHUtil.resolveColor(getView().context, R.attr.cardBackgroundColor) get() = ATHUtil.resolveColor(getView().context, R.attr.colorSurface)
abstract fun onColorReady(color: Int) abstract fun onColorReady(color: Int)

View file

@ -48,9 +48,7 @@ interface ArtistsPresenter : Presenter<ArtistsView> {
override fun loadArtists() { override fun loadArtists() {
launch { launch {
when (val result = repository.allArtists()) { when (val result = repository.allArtists()) {
is Result.Success -> withContext(Dispatchers.Main) { is Result.Success -> withContext(Dispatchers.Main) { view?.artists(result.data) }
view?.artists(result.data)
}
is Result.Error -> withContext(Dispatchers.Main) { view?.showEmptyView() } is Result.Error -> withContext(Dispatchers.Main) { view?.showEmptyView() }
} }
} }

View file

@ -48,7 +48,7 @@ class ColorIconsImageView : AppCompatImageView {
attributes.recycle() attributes.recycle()
} }
private fun setIconBackgroundColor(color: Int) { fun setIconBackgroundColor(color: Int) {
setBackgroundResource(R.drawable.color_circle_gradient) setBackgroundResource(R.drawable.color_circle_gradient)
if (ATHUtil.isWindowBackgroundDark(context) && PreferenceUtil.getInstance(context).desaturatedColor()) { if (ATHUtil.isWindowBackgroundDark(context) && PreferenceUtil.getInstance(context).desaturatedColor()) {
val desaturatedColor = RetroColorUtil.desaturateColor(color, 0.4f) val desaturatedColor = RetroColorUtil.desaturateColor(color, 0.4f)

View file

@ -0,0 +1,56 @@
/*
* 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.
*/
package code.name.monkey.retromusic.views
import android.content.Context
import android.graphics.Color
import android.util.AttributeSet
import android.view.View
import android.widget.FrameLayout
import code.name.monkey.retromusic.R
import kotlinx.android.synthetic.main.list_setting_item_view.view.*
/**
* Created by hemanths on 2019-12-10.
*/
class SettingListItemView : FrameLayout {
constructor(context: Context) : super(context) {
init(context, null)
}
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
init(context, attrs)
}
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
init(context, attrs)
}
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {
init(context, attrs)
}
private fun init(context: Context, attributeSet: AttributeSet?) {
View.inflate(context, R.layout.list_setting_item_view, this)
val typedArray = context.obtainStyledAttributes(attributeSet, R.styleable.SettingListItemView)
icon as ColorIconsImageView
if (typedArray.hasValue(R.styleable.SettingListItemView_settingListItemIcon)) {
icon.setImageDrawable(typedArray.getDrawable(R.styleable.SettingListItemView_settingListItemIcon))
}
icon.setIconBackgroundColor(typedArray.getColor(R.styleable.SettingListItemView_settingListItemIconColor, Color.WHITE))
title.text = typedArray.getText(R.styleable.SettingListItemView_settingListItemTitle)
text.text = typedArray.getText(R.styleable.SettingListItemView_settingListItemText)
typedArray.recycle()
}
}

View file

@ -16,7 +16,6 @@ package code.name.monkey.retromusic.views;
import android.content.Context; import android.content.Context;
import android.content.res.Resources; import android.content.res.Resources;
import android.graphics.Canvas;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.View; import android.view.View;
@ -27,14 +26,17 @@ public class StatusBarView extends View {
public StatusBarView(@NonNull Context context) { public StatusBarView(@NonNull Context context) {
super(context); super(context);
init(context);
} }
public StatusBarView(@NonNull Context context, @NonNull AttributeSet attrs) { public StatusBarView(@NonNull Context context, @NonNull AttributeSet attrs) {
super(context, attrs); super(context, attrs);
init(context);
} }
public StatusBarView(@NonNull Context context, @NonNull AttributeSet attrs, int defStyleAttr) { public StatusBarView(@NonNull Context context, @NonNull AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr); super(context, attrs, defStyleAttr);
init(context);
} }
public static int getStatusBarHeight(@NonNull Resources r) { public static int getStatusBarHeight(@NonNull Resources r) {
@ -46,6 +48,10 @@ public class StatusBarView extends View {
return result; return result;
} }
private void init(Context context) {
}
@Override @Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), getStatusBarHeight(getResources())); setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), getStatusBarHeight(getResources()));

View file

@ -1,19 +0,0 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/colorControlHighlight">
<item android:id="@android:id/mask">
<shape>
<corners android:radius="8dp" />
<solid android:color="@android:color/transparent" />
</shape>
</item>
<item>
<selector>
<item android:state_activated="true">
<shape>
<corners android:radius="8dp" />
<solid android:color="?android:attr/colorControlHighlight" />
</shape>
</item>
</selector>
</item>
</ripple>

View file

@ -1,15 +0,0 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/ripple_material_dark">
<item
android:id="@android:id/mask"
android:drawable="@android:color/white" />
<item>
<selector>
<item
android:drawable="@color/ripple_material_dark"
android:state_activated="true" />
</selector>
</item>
</ripple>

View file

@ -1,15 +0,0 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/ate_control_normal_dark">
<item
android:id="@android:id/mask"
android:drawable="@android:color/white" />
<item>
<selector>
<item
android:drawable="@color/ate_control_normal_dark"
android:state_activated="true" />
</selector>
</item>
</ripple>

View file

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

View file

@ -1,9 +1,29 @@
<?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android"
<selector xmlns:android="http://schemas.android.com/apk/res/android"> android:color="?attr/colorControlHighlight">
<item android:id="@android:id/mask">
<item android:drawable="@color/ripple_material_light" android:state_activated="true" android:state_pressed="true" /> <shape>
<item android:drawable="@color/ripple_material_light" android:state_activated="true" /> <corners android:radius="8dp" />
<item android:drawable="@color/ripple_material_light" android:state_pressed="true" /> <solid android:color="@android:color/transparent" />
<item android:drawable="@android:color/transparent" /> </shape>
</item>
<item>
<selector>
<item android:state_activated="true">
<shape>
<corners android:radius="8dp" />
<solid android:color="?android:attr/colorControlHighlight" />
</shape>
</item>
<item android:state_pressed="true">
<ripple android:color="?android:attr/colorControlHighlight">
<item>
<shape>
<corners android:radius="8dp" />
<solid android:color="?android:attr/colorControlHighlight" />
</shape>
</item>
</ripple>
</item>
</selector> </selector>
</item>
</ripple>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/ripple_material_dark" android:state_activated="true" android:state_pressed="true"/>
<item android:drawable="@color/ripple_material_dark" android:state_activated="true"/>
<item android:drawable="@color/ripple_material_dark" android:state_pressed="true"/>
<item android:drawable="@android:color/transparent"/>
</selector>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/ate_control_normal_dark" android:state_activated="true" android:state_pressed="true"/>
<item android:drawable="@color/ate_control_normal_dark" android:state_activated="true"/>
<item android:drawable="@color/ate_control_normal_dark" android:state_pressed="true"/>
<item android:drawable="@android:color/transparent"/>
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

View file

@ -119,7 +119,8 @@
android:paddingTop="4dp" android:paddingTop="4dp"
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextViewHeadline6" android:textAppearance="@style/TextViewSubtitle2"
android:textColor="?android:attr/textColorSecondary"
tools:ignore="MissingPrefix" tools:ignore="MissingPrefix"
tools:text="Album details name" /> tools:text="Album details name" />

View file

@ -97,6 +97,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="4dp" android:paddingTop="4dp"
android:textAppearance="@style/TextViewSubtitle2" android:textAppearance="@style/TextViewSubtitle2"
android:textColor="?android:attr/textColorSecondary"
tools:ignore="MissingPrefix" tools:ignore="MissingPrefix"
tools:text="Title" /> tools:text="Title" />

View file

@ -128,6 +128,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="4dp" android:paddingTop="4dp"
android:textAppearance="@style/TextViewHeadline6" android:textAppearance="@style/TextViewHeadline6"
android:textColor="?android:attr/textColorSecondary"
tools:ignore="MissingPrefix" tools:ignore="MissingPrefix"
tools:text="Album details" /> tools:text="Album details" />

View file

@ -106,6 +106,7 @@
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextViewHeadline6" android:textAppearance="@style/TextViewHeadline6"
android:textColor="?android:attr/textColorSecondary"
tools:ignore="MissingPrefix" tools:ignore="MissingPrefix"
tools:text="Title" /> tools:text="Title" />

View file

@ -126,7 +126,7 @@
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/albumText" android:id="@+id/albumText"
style="@style/TextAppearance.MaterialComponents.Headline6" style="@style/TextViewHeadline6"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
@ -134,6 +134,7 @@
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:freezesText="true" android:freezesText="true"
android:textColor="?android:attr/textColorSecondary"
android:marqueeRepeatLimit="marquee_forever" android:marqueeRepeatLimit="marquee_forever"
android:paddingTop="4dp" android:paddingTop="4dp"
android:scrollHorizontally="true" android:scrollHorizontally="true"

View file

@ -101,6 +101,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="4dp" android:paddingTop="4dp"
android:textAppearance="@style/TextViewHeadline6" android:textAppearance="@style/TextViewHeadline6"
android:textColor="?android:attr/textColorSecondary"
tools:ignore="MissingPrefix" tools:ignore="MissingPrefix"
tools:text="Title" /> tools:text="Title" />

View file

@ -6,16 +6,11 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareLayout <code.name.monkey.retromusic.views.WidthFitSquareCardView
android:layout_width="156dp" android:layout_width="156dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView
android:id="@+id/imageContainerCard"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp" android:layout_margin="8dp"
android:orientation="vertical"
app:cardCornerRadius="6dp" app:cardCornerRadius="6dp"
app:cardElevation="4dp" app:cardElevation="4dp"
app:cardPreventCornerOverlap="true"> app:cardPreventCornerOverlap="true">
@ -26,9 +21,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="centerCrop" android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[17]" /> tools:srcCompat="@tools:sample/backgrounds/scenic[17]" />
</com.google.android.material.card.MaterialCardView> </code.name.monkey.retromusic.views.WidthFitSquareCardView>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/title" android:id="@+id/title"

View file

@ -114,6 +114,7 @@
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle2" android:textAppearance="@style/TextViewSubtitle2"
android:textColor="?android:attr/textColorSecondary"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/artistImage" app:layout_constraintStart_toEndOf="@id/artistImage"

View file

@ -98,6 +98,7 @@
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:textAppearance="@style/TextViewSubtitle2" android:textAppearance="@style/TextViewSubtitle2"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/artistTitle" app:layout_constraintTop_toBottomOf="@id/artistTitle"

View file

@ -42,7 +42,7 @@
android:layout_gravity="fill_vertical" android:layout_gravity="fill_vertical"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"> app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<WebView <code.name.monkey.retromusic.views.LollipopFixedWebView
android:id="@+id/license" android:id="@+id/license"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

View file

@ -10,7 +10,6 @@
android:id="@+id/status_bar" android:id="@+id/status_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:background="?attr/colorSurface"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
<androidx.coordinatorlayout.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout

View file

@ -4,21 +4,17 @@
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:foreground="?rectSelector" android:foreground="?rectSelector"
android:gravity="center_vertical|start" android:gravity="center_vertical|start"
android:minHeight="@dimen/tab_height" android:minHeight="@dimen/tab_height"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="12dp" android:paddingStart="12dp"
android:paddingLeft="12dp" android:paddingEnd="4dp">
android:paddingEnd="4dp"
android:paddingRight="4dp">
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingEnd="8dp" android:paddingEnd="8dp"
android:paddingRight="8dp"
android:textAllCaps="true" android:textAllCaps="true"
android:textColor="#fff" android:textColor="#fff"
tools:ignore="RtlSymmetry,UnusedAttribute" tools:ignore="RtlSymmetry,UnusedAttribute"

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"
tools:text="00:22" /> tools:text="00:22" />
@ -41,7 +41,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

@ -18,9 +18,9 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/coordinatorLayout" android:id="@+id/coordinatorLayout"
android:background="?attr/colorSurface"
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 <com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout" android:id="@+id/appBarLayout"
@ -38,7 +38,6 @@
android:layout_marginTop="@dimen/toolbar_margin_vertical" android:layout_marginTop="@dimen/toolbar_margin_vertical"
android:layout_marginEnd="@dimen/toolbar_margin_horizontal" android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
android:layout_marginBottom="@dimen/toolbar_margin_vertical" android:layout_marginBottom="@dimen/toolbar_margin_vertical"
app:cardBackgroundColor="?colorSurface"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardUseCompatPadding="true" app:cardUseCompatPadding="true"
app:layout_scrollFlags="scroll|enterAlways"> app:layout_scrollFlags="scroll|enterAlways">
@ -56,7 +55,6 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height" android:layout_height="@dimen/toolbar_height"
android:background="?colorSurface"
app:contentInsetStart="0dp" app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp" app:contentInsetStartWithNavigation="0dp"
app:popupTheme="?toolbarPopupTheme" app:popupTheme="?toolbarPopupTheme"
@ -77,7 +75,6 @@
android:layout_height="@dimen/tab_height" android:layout_height="@dimen/tab_height"
android:paddingStart="60dp" android:paddingStart="60dp"
android:paddingEnd="8dp" android:paddingEnd="8dp"
app:cardBackgroundColor="?colorSurface"
app:layout_collapseMode="pin" /> app:layout_collapseMode="pin" />
</LinearLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
@ -92,15 +89,34 @@
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" />
<com.google.android.material.textview.MaterialTextView <LinearLayout
android:id="@android:id/empty" android:id="@android:id/empty"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:padding="24dp" android:gravity="center"
android:text="@string/empty" android:orientation="vertical"
android:textAppearance="@style/TextViewNormal" android:visibility="gone"
android:textColor="?colorOnSecondary" /> tools:visibility="visible">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/emptyEmoji"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="@string/empty_text_emoji"
android:textAppearance="@style/TextViewHeadline3" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/emptyText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/nothing_to_see"
android:textAppearance="@style/TextViewHeadline5"
android:textColor="?android:attr/textColorSecondary"
tools:visibility="visible" />
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout> </LinearLayout>

View file

@ -17,7 +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:background="?colorSurface"
android:orientation="vertical"> android:orientation="vertical">
<FrameLayout <FrameLayout

View file

@ -89,355 +89,79 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
<LinearLayout <code.name.monkey.retromusic.views.SettingListItemView
android:id="@+id/generalSettings" android:id="@+id/generalSettings"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?rectSelector" app:settingListItemIcon="@drawable/ic_theme_palette_white_24dp"
android:gravity="center_vertical" app:settingListItemIconColor="@color/md_blue_A400"
android:minHeight="72dp" app:settingListItemText="@string/general_settings_summary"
android:orientation="horizontal"> app:settingListItemTitle="@string/general_settings_title" />
<code.name.monkey.retromusic.views.ColorIconsImageView <code.name.monkey.retromusic.views.SettingListItemView
android:id="@+id/general_settings_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="10dp"
app:iconBackgroundColor="@color/md_blue_A400"
app:srcCompat="@drawable/ic_theme_palette_white_24dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:orientation="vertical">
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:text="@string/general_settings_title"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:maxLines="4"
android:text="@string/general_settings_summary" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/nowPlayingSettings" android:id="@+id/nowPlayingSettings"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?rectSelector" app:settingListItemIcon="@drawable/ic_play_circle_filled_white_24dp"
android:gravity="center_vertical" app:settingListItemIconColor="@color/md_red_A400"
android:minHeight="72dp" app:settingListItemText="@string/now_playing_summary"
android:orientation="horizontal"> app:settingListItemTitle="@string/now_playing" />
<code.name.monkey.retromusic.views.ColorIconsImageView <code.name.monkey.retromusic.views.SettingListItemView
android:id="@+id/now_playing_settings_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="10dp"
app:iconBackgroundColor="@color/md_red_A400"
app:srcCompat="@drawable/ic_play_circle_filled_white_24dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:orientation="vertical">
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:text="@string/now_playing"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:maxLines="4"
android:text="@string/now_playing_summary" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/audioSettings" android:id="@+id/audioSettings"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?rectSelector" app:settingListItemIcon="@drawable/ic_volume_up_white_24dp"
android:gravity="center_vertical" app:settingListItemIconColor="@color/md_deep_purple_A400"
android:minHeight="72dp" app:settingListItemText="@string/audio_settings_summary"
android:orientation="horizontal"> app:settingListItemTitle="@string/pref_header_audio" />
<code.name.monkey.retromusic.views.ColorIconsImageView <code.name.monkey.retromusic.views.SettingListItemView
android:id="@+id/audio_settings_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="10dp"
app:iconBackgroundColor="@color/md_deep_purple_A400"
app:srcCompat="@drawable/ic_volume_up_white_24dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:orientation="vertical">
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:text="@string/pref_header_audio"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:maxLines="4"
android:text="@string/audio_settings_summary" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/personalizeSettings" android:id="@+id/personalizeSettings"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?rectSelector" app:settingListItemIcon="@drawable/ic_hdr_strong_white_24dp"
android:gravity="center_vertical" app:settingListItemIconColor="@color/md_teal_A400"
android:minHeight="72dp" app:settingListItemText="@string/personalize_settings_summary"
android:orientation="horizontal"> app:settingListItemTitle="@string/personalize" />
<code.name.monkey.retromusic.views.ColorIconsImageView
android:id="@+id/personalize_settings_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="10dp"
app:iconBackgroundColor="@color/md_teal_A400"
app:srcCompat="@drawable/ic_hdr_strong_white_24dp" />
<LinearLayout <code.name.monkey.retromusic.views.SettingListItemView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:orientation="vertical">
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:text="@string/personalize"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:maxLines="4"
android:text="@string/personalize_settings_summary" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/imageSettings" android:id="@+id/imageSettings"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?rectSelector" app:settingListItemIcon="@drawable/ic_image_white_24dp"
android:gravity="center_vertical" app:settingListItemIconColor="@color/md_deep_orange_A400"
android:minHeight="72dp" app:settingListItemText="@string/image_settings_summary"
android:orientation="horizontal"> app:settingListItemTitle="@string/pref_header_images" />
<code.name.monkey.retromusic.views.ColorIconsImageView <code.name.monkey.retromusic.views.SettingListItemView
android:id="@+id/image_settings_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="10dp"
app:iconBackgroundColor="@color/md_deep_orange_A400"
app:srcCompat="@drawable/ic_image_white_24dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:orientation="vertical">
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:text="@string/pref_header_images"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:maxLines="4"
android:text="@string/image_settings_summary" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/notificationSettings" android:id="@+id/notificationSettings"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?rectSelector" app:settingListItemIcon="@drawable/ic_notifications_active_white_24dp"
android:gravity="center_vertical" app:settingListItemIconColor="@color/md_yellow_A400"
android:minHeight="72dp" app:settingListItemText="@string/notification_settings_summary"
android:orientation="horizontal"> app:settingListItemTitle="@string/notification" />
<code.name.monkey.retromusic.views.ColorIconsImageView <code.name.monkey.retromusic.views.SettingListItemView
android:id="@+id/notification_settings_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="10dp"
app:iconBackgroundColor="@color/md_yellow_A400"
app:srcCompat="@drawable/ic_notifications_active_white_24dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:orientation="vertical">
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:text="@string/notification"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:maxLines="4"
android:text="@string/notification_settings_summary" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/otherSettings" android:id="@+id/otherSettings"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?rectSelector" app:settingListItemIcon="@drawable/ic_notifications_active_white_24dp"
android:gravity="center_vertical" app:settingListItemIconColor="@color/md_indigo_A400"
android:minHeight="72dp" app:settingListItemText="@string/other_settings_summary"
android:orientation="horizontal"> app:settingListItemTitle="@string/others" />
<code.name.monkey.retromusic.views.ColorIconsImageView
android:id="@+id/other_settings_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="10dp"
app:iconBackgroundColor="@color/md_indigo_A400"
app:srcCompat="@drawable/ic_testing_white_24dp" />
<LinearLayout <code.name.monkey.retromusic.views.SettingListItemView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:gravity="center_vertical"
android:orientation="vertical">
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:text="@string/others"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:maxLines="4"
android:text="@string/other_settings_summary" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/aboutSettings" android:id="@+id/aboutSettings"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?rectSelector" app:settingListItemIcon="@drawable/ic_info_outline_white_24dp"
android:gravity="center_vertical" app:settingListItemIconColor="@color/md_light_green_A400"
android:minHeight="72dp" app:settingListItemText="@string/about_settings_summary"
android:orientation="horizontal"> app:settingListItemTitle="@string/action_about" />
<code.name.monkey.retromusic.views.ColorIconsImageView
android:id="@+id/about_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:padding="10dp"
app:iconBackgroundColor="@color/md_light_green_A400"
app:srcCompat="@drawable/ic_info_outline_white_24dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:gravity="center_vertical"
android:orientation="vertical">
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:text="@string/action_about"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@string/about_settings_summary" />
</LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>

View file

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

View file

@ -55,6 +55,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:textColor="?android:attr/textColorSecondary"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="@+id/icon" app:layout_constraintBottom_toBottomOf="@+id/icon"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View file

@ -50,13 +50,14 @@
android:gravity="center" android:gravity="center"
android:textAppearance="@style/TextViewHeadline5" android:textAppearance="@style/TextViewHeadline5"
android:textStyle="bold" android:textStyle="bold"
tools:text="Name" /> tools:text="@tools:sample/full_names" />
<code.name.monkey.retromusic.views.BaselineGridTextView <code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/text" android:id="@+id/text"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
app:lineHeightHint="24sp" app:lineHeightHint="24sp"
tools:text="role" /> tools:text="@tools:sample/lorem/random" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View file

@ -6,16 +6,11 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareLayout <code.name.monkey.retromusic.views.WidthFitSquareCardView
android:layout_width="136dp" android:layout_width="136dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView
android:id="@+id/imageContainerCard"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp" android:layout_margin="8dp"
android:orientation="vertical"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardPreventCornerOverlap="true"> app:cardPreventCornerOverlap="true">
@ -25,9 +20,9 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="centerCrop" android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" /> tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
</com.google.android.material.card.MaterialCardView>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
</code.name.monkey.retromusic.views.WidthFitSquareCardView>
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/title" android:id="@+id/title"
@ -35,7 +30,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:padding="10dp" android:padding="8dp"
android:textAppearance="@style/TextViewNormal" android:textAppearance="@style/TextViewNormal"
android:textColor="?android:attr/textColorSecondary"
tools:text="Song name" /> tools:text="Song name" />
</LinearLayout> </LinearLayout>

View file

@ -55,6 +55,7 @@
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin" app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toBottomOf="@android:id/title" app:layout_constraintTop_toBottomOf="@android:id/title"
app:lineHeightHint="24sp" app:lineHeightHint="24sp"
android:textColor="?android:attr/textColorSecondary"
tools:maxLines="2" tools:maxLines="2"
tools:text="@tools:sample/lorem/random" /> tools:text="@tools:sample/lorem/random" />

View file

@ -50,6 +50,7 @@
android:id="@android:id/summary" android:id="@android:id/summary"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin" app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"

View file

@ -52,6 +52,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="0dp" android:paddingStart="0dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:textColor="?android:attr/textColorSecondary"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintEnd_toStartOf="@android:id/checkbox" app:layout_constraintEnd_toStartOf="@android:id/checkbox"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin" app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"

View file

@ -0,0 +1,60 @@
<?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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?rectSelector"
android:gravity="center_vertical"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:orientation="horizontal">
<code.name.monkey.retromusic.views.ColorIconsImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:padding="10dp"
app:iconBackgroundColor="@color/md_blue_A400"
app:srcCompat="@drawable/ic_theme_palette_white_24dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:orientation="vertical">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:text="@string/general_settings_title"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:maxLines="4"
android:text="@string/general_settings_summary"
android:textColor="?android:attr/textColorSecondary" />
</LinearLayout>
</LinearLayout>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<dimen name="toolbar_margin_horizontal">52dp</dimen> <dimen name="toolbar_margin_horizontal">8dp</dimen>
</resources> </resources>

View file

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?><!--
<!--
~ Copyright (c) 2019 Hemanth Savarala. ~ Copyright (c) 2019 Hemanth Savarala.
~ ~
~ Licensed under the GNU General Public License v3 ~ Licensed under the GNU General Public License v3
@ -46,14 +45,16 @@
<item name="windowActionBarOverlay">true</item> <item name="windowActionBarOverlay">true</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item> <item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
<item name="mcab_popup_theme">@style/ThemeOverlay.AppCompat.Dark</item> <item name="mcab_popup_theme">@style/ThemeOverlay.AppCompat.Dark</item>
<item name="roundSelector">@drawable/round_selector_dark</item> <item name="roundSelector">@drawable/round_selector</item>
<item name="rectSelector">@drawable/rect_selector_dark</item> <item name="rectSelector">@drawable/rect_selector</item>
<item name="android:actionOverflowButtonStyle">@style/Widget.ActionButton.Overflow</item> <item name="android:actionOverflowButtonStyle">@style/Widget.ActionButton.Overflow</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item> <item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<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="android:windowLightNavigationBar">false</item> <item name="android:windowLightNavigationBar">false</item>
<!--Manual setting colors-->
<item name="colorSurface">@color/darkColorSurface</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">

View file

@ -20,13 +20,13 @@
<color name="darkColorOnPrimary">#ffffff</color> <color name="darkColorOnPrimary">#ffffff</color>
<color name="darkColorSecondary">#202124</color> <color name="darkColorSecondary">#202124</color>
<color name="darkColorBackground">#202124</color> <color name="darkColorBackground">#202124</color>
<color name="darkColorSurface">#17181a</color> <color name="darkColorSurface">#202124</color>
<color name="blackColorPrimary">#000000</color> <color name="blackColorPrimary">#000000</color>
<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

@ -0,0 +1,22 @@
<?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>
<declare-styleable name="SettingListItemView">
<attr name="settingListItemIcon" format="reference" />
<attr name="settingListItemIconColor" format="reference" />
<attr name="settingListItemTitle" format="string" />
<attr name="settingListItemText" format="string" />
</declare-styleable>
</resources>

View file

@ -813,4 +813,5 @@
<string name="pref_header_advanced">Advanced</string> <string name="pref_header_advanced">Advanced</string>
<string name="pref_header_blacklist">Blacklist</string> <string name="pref_header_blacklist">Blacklist</string>
<string name="no_playing_queue">No songs playing</string> <string name="no_playing_queue">No songs playing</string>
<string name="nothing_to_see">Nothing to see</string>
</resources> </resources>

View file

@ -24,15 +24,15 @@
<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/darkColorPrimary</item> <item name="md_background_color">@color/darkColorSurface</item>
<item name="android:windowActionBarOverlay">true</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="windowActionBarOverlay">true</item> <item name="windowActionBarOverlay">true</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item> <item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
<item name="mcab_popup_theme">@style/ThemeOverlay.AppCompat.Dark</item> <item name="mcab_popup_theme">@style/ThemeOverlay.AppCompat.Dark</item>
<item name="roundSelector">@drawable/round_selector_dark</item> <item name="roundSelector">@drawable/round_selector</item>
<item name="rectSelector">@drawable/rect_selector_dark</item> <item name="rectSelector">@drawable/rect_selector</item>
<item name="android:actionOverflowButtonStyle">@style/Widget.ActionButton.Overflow</item> <item name="android:actionOverflowButtonStyle">@style/Widget.ActionButton.Overflow</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item> <item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>