Ripple cover and color adjustment
This commit is contained in:
commit
8dc9083ff7
50 changed files with 485 additions and 675 deletions
|
@ -44,7 +44,6 @@ import com.afollestad.materialcab.MaterialCab
|
|||
import com.bumptech.glide.Glide
|
||||
import kotlinx.android.synthetic.main.activity_album.*
|
||||
import kotlinx.android.synthetic.main.activity_album_content.*
|
||||
import kotlinx.android.synthetic.main.status_bar.*
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
import android.util.Pair as UtilPair
|
||||
|
@ -203,7 +202,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
|
|||
MaterialUtil.setTint(button = playAction, color = buttonColor)
|
||||
|
||||
val toolbarColor = ATHUtil.resolveColor(this, R.attr.colorSurface)
|
||||
status_bar.setBackgroundColor(toolbarColor)
|
||||
//status_bar.setBackgroundColor(toolbarColor)
|
||||
toolbar.setBackgroundColor(toolbarColor)
|
||||
setSupportActionBar(toolbar)
|
||||
supportActionBar?.title = null
|
||||
|
@ -266,14 +265,10 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
|
|||
|
||||
private fun setUpSortOrderMenu(sortOrder: SubMenu) {
|
||||
when (savedSortOrder) {
|
||||
AlbumSongSortOrder.SONG_A_Z -> sortOrder.findItem(R.id.action_sort_order_title)
|
||||
.isChecked = true
|
||||
AlbumSongSortOrder.SONG_Z_A -> sortOrder.findItem(R.id.action_sort_order_title_desc)
|
||||
.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
|
||||
AlbumSongSortOrder.SONG_A_Z -> sortOrder.findItem(R.id.action_sort_order_title).isChecked = true
|
||||
AlbumSongSortOrder.SONG_Z_A -> sortOrder.findItem(R.id.action_sort_order_title_desc).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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ import com.afollestad.materialcab.MaterialCab
|
|||
import com.bumptech.glide.Glide
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.*
|
||||
import kotlinx.android.synthetic.main.activity_artist_details.*
|
||||
import kotlinx.android.synthetic.main.status_bar.*
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
import kotlin.collections.ArrayList
|
||||
|
@ -243,7 +242,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
MaterialUtil.setTint(button = playAction, color = buttonColor)
|
||||
|
||||
val toolbarColor = ATHUtil.resolveColor(this, R.attr.colorSurface)
|
||||
status_bar.setBackgroundColor(toolbarColor)
|
||||
//status_bar.setBackgroundColor(toolbarColor)
|
||||
toolbar.setBackgroundColor(toolbarColor)
|
||||
setSupportActionBar(toolbar)
|
||||
supportActionBar?.title = null
|
||||
|
|
|
@ -90,7 +90,7 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
|
|||
val statusBar = window.decorView.rootView.findViewById<View>(R.id.status_bar)
|
||||
if (statusBar != null) {
|
||||
when {
|
||||
VersionUtils.hasMarshmallow() -> window.statusBarColor = color
|
||||
VersionUtils.hasMarshmallow() -> statusBar.setBackgroundColor(color)
|
||||
VersionUtils.hasLollipop() -> statusBar.setBackgroundColor(ColorUtil.darkenColor(color))
|
||||
else -> statusBar.setBackgroundColor(color)
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
|
|||
|
||||
fun setStatusbarColorAuto() {
|
||||
// we don't want to use statusbar color because we are doing the color darkening on our own to support KitKat
|
||||
//setStatusbarColor(ATHUtil.resolveColor(this, android.R.attr.windowBackground))
|
||||
setStatusbarColor(ATHUtil.resolveColor(this, R.attr.colorSurface))
|
||||
setLightStatusbarAuto(ATHUtil.resolveColor(this, R.attr.colorSurface))
|
||||
}
|
||||
|
||||
|
|
|
@ -3,198 +3,195 @@ package code.name.monkey.retromusic.adapter.album
|
|||
import android.app.ActivityOptions
|
||||
import android.content.res.ColorStateList
|
||||
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 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.adapter.base.*
|
||||
import code.name.monkey.retromusic.glide.*
|
||||
import code.name.monkey.retromusic.helper.*
|
||||
import code.name.monkey.retromusic.adapter.base.AbsMultiSelectAdapter
|
||||
import code.name.monkey.retromusic.adapter.base.MediaEntryViewHolder
|
||||
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.interfaces.CabHolder
|
||||
import code.name.monkey.retromusic.model.*
|
||||
import code.name.monkey.retromusic.util.*
|
||||
import code.name.monkey.retromusic.model.Album
|
||||
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.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
|
||||
|
||||
open class AlbumAdapter(
|
||||
protected val activity: AppCompatActivity,
|
||||
dataSet: ArrayList<Album>,
|
||||
protected var itemLayoutRes: Int,
|
||||
usePalette: Boolean,
|
||||
cabHolder: CabHolder?
|
||||
protected val activity: AppCompatActivity,
|
||||
dataSet: ArrayList<Album>,
|
||||
protected var itemLayoutRes: Int,
|
||||
usePalette: Boolean,
|
||||
cabHolder: CabHolder?
|
||||
) : AbsMultiSelectAdapter<AlbumAdapter.ViewHolder, Album>(
|
||||
activity, cabHolder, code.name.monkey.retromusic.R.menu.menu_media_selection
|
||||
activity,
|
||||
cabHolder,
|
||||
R.menu.menu_media_selection
|
||||
), FastScrollRecyclerView.SectionedAdapter {
|
||||
var dataSet: ArrayList<Album>
|
||||
protected set
|
||||
var dataSet: ArrayList<Album>
|
||||
protected set
|
||||
|
||||
protected var usePalette = false
|
||||
protected var usePalette = false
|
||||
|
||||
init {
|
||||
this.dataSet = dataSet
|
||||
this.usePalette = usePalette
|
||||
this.setHasStableIds(true)
|
||||
}
|
||||
init {
|
||||
this.dataSet = dataSet
|
||||
this.usePalette = usePalette
|
||||
this.setHasStableIds(true)
|
||||
}
|
||||
|
||||
fun useItemLayout(itemLayoutRes: Int) {
|
||||
this.itemLayoutRes = itemLayoutRes
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
fun useItemLayout(itemLayoutRes: Int) {
|
||||
this.itemLayoutRes = itemLayoutRes
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun usePalette(usePalette: Boolean) {
|
||||
this.usePalette = usePalette
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
fun usePalette(usePalette: Boolean) {
|
||||
this.usePalette = usePalette
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun swapDataSet(dataSet: ArrayList<Album>) {
|
||||
this.dataSet = dataSet
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
fun swapDataSet(dataSet: ArrayList<Album>) {
|
||||
this.dataSet = dataSet
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(activity).inflate(itemLayoutRes, parent, false)
|
||||
return createViewHolder(view, viewType)
|
||||
}
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(activity).inflate(itemLayoutRes, parent, false)
|
||||
return createViewHolder(view, viewType)
|
||||
}
|
||||
|
||||
protected open fun createViewHolder(view: View, viewType: Int): ViewHolder {
|
||||
return ViewHolder(view)
|
||||
}
|
||||
protected open fun createViewHolder(view: View, viewType: Int): ViewHolder {
|
||||
return ViewHolder(view)
|
||||
}
|
||||
|
||||
private fun getAlbumTitle(album: Album): String? {
|
||||
return album.title
|
||||
}
|
||||
private fun getAlbumTitle(album: Album): String? {
|
||||
return album.title
|
||||
}
|
||||
|
||||
protected open fun getAlbumText(album: Album): String? {
|
||||
return album.artistName
|
||||
}
|
||||
protected open fun getAlbumText(album: Album): String? {
|
||||
return album.artistName
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val album = dataSet[position]
|
||||
val isChecked = isChecked(album)
|
||||
holder.itemView.isActivated = isChecked
|
||||
holder.title?.text = getAlbumTitle(album)
|
||||
holder.text?.text = getAlbumText(album)
|
||||
holder.playSongs?.setOnClickListener {
|
||||
album.songs?.let { songs ->
|
||||
MusicPlayerRemote.openQueue(
|
||||
songs, 0, true
|
||||
)
|
||||
}
|
||||
}
|
||||
loadAlbumCover(album, holder)
|
||||
}
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val album = dataSet[position]
|
||||
val isChecked = isChecked(album)
|
||||
holder.itemView.isActivated = isChecked
|
||||
holder.title?.text = getAlbumTitle(album)
|
||||
holder.text?.text = getAlbumText(album)
|
||||
holder.playSongs?.setOnClickListener { album.songs?.let { songs -> MusicPlayerRemote.openQueue(songs, 0, true) } }
|
||||
loadAlbumCover(album, holder)
|
||||
}
|
||||
|
||||
protected open fun setColors(color: Int, holder: ViewHolder) {
|
||||
if (holder.paletteColorContainer != null) {
|
||||
holder.title?.setTextColor(
|
||||
MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(color))
|
||||
)
|
||||
holder.text?.setTextColor(
|
||||
MaterialValueHelper.getSecondaryTextColor(
|
||||
activity, ColorUtil.isColorLight(
|
||||
color
|
||||
)
|
||||
)
|
||||
)
|
||||
holder.paletteColorContainer?.setBackgroundColor(color)
|
||||
}
|
||||
protected open fun setColors(color: Int, holder: ViewHolder) {
|
||||
if (holder.paletteColorContainer != null) {
|
||||
holder.title?.setTextColor(MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(color)))
|
||||
holder.text?.setTextColor(MaterialValueHelper.getSecondaryTextColor(activity, ColorUtil.isColorLight(color)))
|
||||
holder.paletteColorContainer?.setBackgroundColor(color)
|
||||
}
|
||||
holder.mask?.backgroundTintList = ColorStateList.valueOf(color)
|
||||
}
|
||||
|
||||
holder.mask?.backgroundTintList = ColorStateList.valueOf(color)
|
||||
}
|
||||
protected open fun loadAlbumCover(album: Album, holder: ViewHolder) {
|
||||
if (holder.image == null) {
|
||||
return
|
||||
}
|
||||
|
||||
protected open fun loadAlbumCover(album: Album, holder: ViewHolder) {
|
||||
if (holder.image == null) {
|
||||
return
|
||||
}
|
||||
SongGlideRequest.Builder.from(Glide.with(activity), album.safeGetFirstSong())
|
||||
.checkIgnoreMediaStore(activity).generatePalette(activity).build()
|
||||
.into(object : RetroMusicColoredTarget(holder.image!!) {
|
||||
override fun onLoadCleared(placeholder: Drawable?) {
|
||||
super.onLoadCleared(placeholder)
|
||||
setColors(defaultFooterColor, holder)
|
||||
}
|
||||
|
||||
SongGlideRequest.Builder.from(Glide.with(activity), album.safeGetFirstSong())
|
||||
.checkIgnoreMediaStore(activity).generatePalette(activity).build()
|
||||
.into(object : RetroMusicColoredTarget(holder.image!!) {
|
||||
override fun onLoadCleared(placeholder: Drawable?) {
|
||||
super.onLoadCleared(placeholder)
|
||||
setColors(defaultFooterColor, holder)
|
||||
}
|
||||
override fun onColorReady(color: Int) {
|
||||
setColors(color, holder)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun onColorReady(color: Int) {
|
||||
setColors(color, holder)
|
||||
}
|
||||
})
|
||||
}
|
||||
override fun getItemCount(): Int {
|
||||
return dataSet.size
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return dataSet.size
|
||||
}
|
||||
override fun getItemId(position: Int): Long {
|
||||
return dataSet[position].id.toLong()
|
||||
}
|
||||
|
||||
override fun getItemId(position: Int): Long {
|
||||
return dataSet[position].id.toLong()
|
||||
}
|
||||
override fun getIdentifier(position: Int): Album? {
|
||||
return dataSet[position]
|
||||
}
|
||||
|
||||
override fun getIdentifier(position: Int): Album? {
|
||||
return dataSet[position]
|
||||
}
|
||||
override fun getName(album: Album): String {
|
||||
return album.title!!
|
||||
}
|
||||
|
||||
override fun getName(album: Album): String {
|
||||
return album.title!!
|
||||
}
|
||||
override fun onMultipleItemAction(
|
||||
menuItem: MenuItem, selection: ArrayList<Album>
|
||||
) {
|
||||
SongsMenuHelper.handleMenuClick(activity, getSongList(selection), menuItem.itemId)
|
||||
}
|
||||
|
||||
override fun onMultipleItemAction(
|
||||
menuItem: MenuItem, selection: ArrayList<Album>
|
||||
) {
|
||||
SongsMenuHelper.handleMenuClick(activity, getSongList(selection), menuItem.itemId)
|
||||
}
|
||||
private fun getSongList(albums: List<Album>): ArrayList<Song> {
|
||||
val songs = ArrayList<Song>()
|
||||
for (album in albums) {
|
||||
songs.addAll(album.songs!!)
|
||||
}
|
||||
return songs
|
||||
}
|
||||
|
||||
private fun getSongList(albums: List<Album>): ArrayList<Song> {
|
||||
val songs = ArrayList<Song>()
|
||||
for (album in albums) {
|
||||
songs.addAll(album.songs!!)
|
||||
}
|
||||
return songs
|
||||
}
|
||||
override fun getSectionName(position: Int): String {
|
||||
var sectionName: String? = null
|
||||
when (PreferenceUtil.getInstance(activity).albumSortOrder) {
|
||||
SortOrder.AlbumSortOrder.ALBUM_A_Z, SortOrder.AlbumSortOrder.ALBUM_Z_A -> sectionName = dataSet[position].title
|
||||
SortOrder.AlbumSortOrder.ALBUM_ARTIST -> sectionName = dataSet[position].artistName
|
||||
SortOrder.AlbumSortOrder.ALBUM_YEAR -> return MusicUtil.getYearString(
|
||||
dataSet[position].year
|
||||
)
|
||||
}
|
||||
|
||||
override fun getSectionName(position: Int): String {
|
||||
var sectionName: String? = null
|
||||
when (PreferenceUtil.getInstance(activity).albumSortOrder) {
|
||||
SortOrder.AlbumSortOrder.ALBUM_A_Z, SortOrder.AlbumSortOrder.ALBUM_Z_A -> sectionName = dataSet[position].title
|
||||
SortOrder.AlbumSortOrder.ALBUM_ARTIST -> sectionName = dataSet[position].artistName
|
||||
SortOrder.AlbumSortOrder.ALBUM_YEAR -> return MusicUtil.getYearString(
|
||||
dataSet[position].year
|
||||
)
|
||||
}
|
||||
return MusicUtil.getSectionName(sectionName)
|
||||
}
|
||||
|
||||
return MusicUtil.getSectionName(sectionName)
|
||||
}
|
||||
inner class ViewHolder(itemView: View) : MediaEntryViewHolder(itemView) {
|
||||
|
||||
inner class ViewHolder(itemView: View) : MediaEntryViewHolder(itemView) {
|
||||
init {
|
||||
setImageTransitionName(activity.getString(R.string.transition_album_art))
|
||||
menu?.visibility = View.GONE
|
||||
}
|
||||
|
||||
init {
|
||||
setImageTransitionName(activity.getString(R.string.transition_album_art))
|
||||
menu?.visibility = View.GONE
|
||||
}
|
||||
override fun onClick(v: View?) {
|
||||
super.onClick(v)
|
||||
if (isInQuickSelectMode) {
|
||||
toggleChecked(adapterPosition)
|
||||
} else {
|
||||
val activityOptions = ActivityOptions.makeSceneTransitionAnimation(
|
||||
activity, image, activity.getString(
|
||||
R.string.transition_album_art
|
||||
)
|
||||
)
|
||||
NavigationUtil.goToAlbumOptions(
|
||||
activity, dataSet[adapterPosition].id, activityOptions
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
super.onClick(v)
|
||||
if (isInQuickSelectMode) {
|
||||
toggleChecked(adapterPosition)
|
||||
} else {
|
||||
val activityOptions = ActivityOptions.makeSceneTransitionAnimation(
|
||||
activity, image, activity.getString(
|
||||
R.string.transition_album_art
|
||||
)
|
||||
)
|
||||
NavigationUtil.goToAlbumOptions(
|
||||
activity, dataSet[adapterPosition].id, activityOptions
|
||||
)
|
||||
}
|
||||
}
|
||||
override fun onLongClick(v: View?): Boolean {
|
||||
toggleChecked(adapterPosition)
|
||||
return super.onLongClick(v)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onLongClick(v: View?): Boolean {
|
||||
toggleChecked(adapterPosition)
|
||||
return super.onLongClick(v)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
val TAG: String = AlbumAdapter::class.java.simpleName
|
||||
}
|
||||
companion object {
|
||||
val TAG: String = AlbumAdapter::class.java.simpleName
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
package code.name.monkey.retromusic.adapter.album
|
||||
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.view.*
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import code.name.monkey.appthemehelper.util.*
|
||||
import code.name.monkey.retromusic.glide.*
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
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.interfaces.CabHolder
|
||||
import code.name.monkey.retromusic.model.Album
|
||||
|
@ -28,22 +31,8 @@ class HorizontalAlbumAdapter(
|
|||
}
|
||||
|
||||
override fun setColors(color: Int, holder: ViewHolder) {
|
||||
holder.title?.setTextColor(
|
||||
MaterialValueHelper.getPrimaryTextColor(
|
||||
activity,
|
||||
ColorUtil.isColorLight(
|
||||
color
|
||||
)
|
||||
)
|
||||
)
|
||||
holder.text?.setTextColor(
|
||||
MaterialValueHelper.getSecondaryTextColor(
|
||||
activity,
|
||||
ColorUtil.isColorLight(
|
||||
color
|
||||
)
|
||||
)
|
||||
)
|
||||
holder.title?.setTextColor(MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(color)))
|
||||
holder.text?.setTextColor(MaterialValueHelper.getSecondaryTextColor(activity, ColorUtil.isColorLight(color)))
|
||||
}
|
||||
|
||||
override fun loadAlbumCover(album: Album, holder: ViewHolder) {
|
||||
|
|
|
@ -65,7 +65,7 @@ open class AlbumsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Al
|
|||
}
|
||||
|
||||
override fun setUsePalette(usePalette: Boolean) {
|
||||
adapter!!.usePalette(usePalette)
|
||||
adapter?.usePalette(usePalette)
|
||||
}
|
||||
|
||||
override fun setGridSize(gridSize: Int) {
|
||||
|
|
|
@ -16,6 +16,7 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.webkit.MimeTypeMap;
|
||||
import android.widget.PopupMenu;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -47,7 +48,6 @@ import java.util.Objects;
|
|||
import code.name.monkey.appthemehelper.ThemeStore;
|
||||
import code.name.monkey.appthemehelper.common.ATHToolbarActivity;
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
|
||||
import code.name.monkey.retromusic.R;
|
||||
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 View coordinatorLayout, empty;
|
||||
|
||||
private TextView emojiText;
|
||||
private MaterialCardView toolbarContainer;
|
||||
|
||||
private Toolbar toolbar;
|
||||
|
||||
private BreadCrumbLayout breadCrumbs;
|
||||
|
||||
private AppBarLayout appBarLayout;
|
||||
|
||||
private FastScrollRecyclerView recyclerView;
|
||||
|
||||
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) {
|
||||
coordinatorLayout = view.findViewById(R.id.coordinatorLayout);
|
||||
toolbarContainer = view.findViewById(R.id.toolbarContainer);
|
||||
|
@ -159,6 +159,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
|||
breadCrumbs = view.findViewById(R.id.breadCrumbs);
|
||||
toolbar = view.findViewById(R.id.toolbar);
|
||||
empty = view.findViewById(android.R.id.empty);
|
||||
emojiText = view.findViewById(R.id.emptyEmoji);
|
||||
}
|
||||
|
||||
private void setCrumb(BreadCrumbLayout.Crumb crumb, boolean addToHistory) {
|
||||
|
@ -232,13 +233,14 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
|||
private void setUpAppbarColor() {
|
||||
int primaryColor = ATHUtil.INSTANCE.resolveColor(requireContext(), R.attr.colorSurface);
|
||||
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.setNavigationOnClickListener(v -> {
|
||||
showMainMenu(OptionsSheetDialogFragment.FOLDER);
|
||||
});
|
||||
breadCrumbs.setActivatedContentColor(ToolbarContentTintHelper.toolbarTitleColor(requireActivity(), ColorUtil.INSTANCE.darkenColor(primaryColor)));
|
||||
breadCrumbs.setDeactivatedContentColor(ToolbarContentTintHelper.toolbarSubtitleColor(requireActivity(), ColorUtil.INSTANCE.darkenColor(primaryColor)));
|
||||
breadCrumbs.setActivatedContentColor(ATHUtil.INSTANCE.resolveColor(requireContext(), android.R.attr.textColorPrimary));
|
||||
breadCrumbs.setDeactivatedContentColor(ATHUtil.INSTANCE.resolveColor(requireContext(), android.R.attr.textColorSecondary));
|
||||
appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> getMainActivity().setLightStatusbar(!ATHUtil.INSTANCE.isWindowBackgroundDark(requireContext())));
|
||||
toolbar.setOnClickListener(v -> {
|
||||
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(getMainActivity(), toolbarContainer, getString(R.string.transition_toolbar));
|
||||
|
@ -470,6 +472,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
|||
}
|
||||
|
||||
private void checkIsEmpty() {
|
||||
emojiText.setText(getEmojiByUnicode(0x1F631));
|
||||
if (empty != null) {
|
||||
empty.setVisibility(adapter == null || adapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
@ -491,8 +494,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
|||
adapter.swapDataSet(files);
|
||||
BreadCrumbLayout.Crumb crumb = getActiveCrumb();
|
||||
if (crumb != null && recyclerView != null) {
|
||||
((LinearLayoutManager) recyclerView.getLayoutManager())
|
||||
.scrollToPositionWithOffset(crumb.getScrollPosition(), 0);
|
||||
((LinearLayoutManager) recyclerView.getLayoutManager()).scrollToPositionWithOffset(crumb.getScrollPosition(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@ import com.bumptech.glide.request.animation.GlideAnimation
|
|||
abstract class RetroMusicColoredTarget(view: ImageView) : BitmapPaletteTarget(view) {
|
||||
|
||||
protected val defaultFooterColor: Int
|
||||
get() = ATHUtil.resolveColor(getView().context, R.attr.defaultFooterColor)
|
||||
get() = ATHUtil.resolveColor(getView().context, R.attr.colorSurface)
|
||||
|
||||
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)
|
||||
|
||||
|
|
|
@ -48,9 +48,7 @@ interface ArtistsPresenter : Presenter<ArtistsView> {
|
|||
override fun loadArtists() {
|
||||
launch {
|
||||
when (val result = repository.allArtists()) {
|
||||
is Result.Success -> withContext(Dispatchers.Main) {
|
||||
view?.artists(result.data)
|
||||
}
|
||||
is Result.Success -> withContext(Dispatchers.Main) { view?.artists(result.data) }
|
||||
is Result.Error -> withContext(Dispatchers.Main) { view?.showEmptyView() }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class ColorIconsImageView : AppCompatImageView {
|
|||
attributes.recycle()
|
||||
}
|
||||
|
||||
private fun setIconBackgroundColor(color: Int) {
|
||||
fun setIconBackgroundColor(color: Int) {
|
||||
setBackgroundResource(R.drawable.color_circle_gradient)
|
||||
if (ATHUtil.isWindowBackgroundDark(context) && PreferenceUtil.getInstance(context).desaturatedColor()) {
|
||||
val desaturatedColor = RetroColorUtil.desaturateColor(color, 0.4f)
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
|
@ -16,7 +16,6 @@ package code.name.monkey.retromusic.views;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
|
@ -27,14 +26,17 @@ public class StatusBarView extends View {
|
|||
|
||||
public StatusBarView(@NonNull Context context) {
|
||||
super(context);
|
||||
init(context);
|
||||
}
|
||||
|
||||
public StatusBarView(@NonNull Context context, @NonNull AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init(context);
|
||||
}
|
||||
|
||||
public StatusBarView(@NonNull Context context, @NonNull AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init(context);
|
||||
}
|
||||
|
||||
public static int getStatusBarHeight(@NonNull Resources r) {
|
||||
|
@ -46,6 +48,10 @@ public class StatusBarView extends View {
|
|||
return result;
|
||||
}
|
||||
|
||||
private void init(Context context) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), getStatusBarHeight(getResources()));
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -1,9 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@color/ripple_material_light" android:state_activated="true" android:state_pressed="true" />
|
||||
<item android:drawable="@color/ripple_material_light" android:state_activated="true" />
|
||||
<item android:drawable="@color/ripple_material_light" android:state_pressed="true" />
|
||||
<item android:drawable="@android:color/transparent" />
|
||||
|
||||
</selector>
|
||||
<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>
|
||||
<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>
|
||||
</item>
|
||||
</ripple>
|
|
@ -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>
|
|
@ -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 |
|
@ -119,7 +119,8 @@
|
|||
android:paddingTop="4dp"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
android:textAppearance="@style/TextViewSubtitle2"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Album details name" />
|
||||
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:textAppearance="@style/TextViewSubtitle2"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Title" />
|
||||
|
||||
|
|
|
@ -128,6 +128,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Album details" />
|
||||
|
||||
|
|
|
@ -106,6 +106,7 @@
|
|||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Title" />
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/albumText"
|
||||
style="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
style="@style/TextViewHeadline6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
|
@ -134,6 +134,7 @@
|
|||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:freezesText="true"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingTop="4dp"
|
||||
android:scrollHorizontally="true"
|
||||
|
|
|
@ -101,6 +101,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Title" />
|
||||
|
||||
|
|
|
@ -6,29 +6,22 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareCardView
|
||||
android:layout_width="156dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_margin="8dp"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardPreventCornerOverlap="true">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/imageContainerCard"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardPreventCornerOverlap="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[17]" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||
android:scaleType="centerCrop"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[17]" />
|
||||
</code.name.monkey.retromusic.views.WidthFitSquareCardView>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title"
|
||||
|
|
|
@ -114,6 +114,7 @@
|
|||
android:layout_marginEnd="16dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewSubtitle2"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/artistImage"
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:textAppearance="@style/TextViewSubtitle2"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/artistTitle"
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
android:layout_gravity="fill_vertical"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<WebView
|
||||
<code.name.monkey.retromusic.views.LollipopFixedWebView
|
||||
android:id="@+id/license"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
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
|
||||
|
|
|
@ -4,21 +4,17 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:foreground="?rectSelector"
|
||||
android:gravity="center_vertical|start"
|
||||
android:minHeight="@dimen/tab_height"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingRight="4dp">
|
||||
android:paddingEnd="4dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="#fff"
|
||||
tools:ignore="RtlSymmetry,UnusedAttribute"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
android:gravity="center_vertical|left|end"
|
||||
android:paddingLeft="8dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="?colorOnSecondary"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="00:22" />
|
||||
|
@ -41,7 +41,7 @@
|
|||
android:gravity="center_vertical|right|end"
|
||||
android:paddingRight="8dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="?colorOnSecondary"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="00:22" />
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/coordinatorLayout"
|
||||
android:background="?attr/colorSurface"
|
||||
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:id="@+id/appBarLayout"
|
||||
|
@ -38,7 +38,6 @@
|
|||
android:layout_marginTop="@dimen/toolbar_margin_vertical"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
|
||||
app:cardBackgroundColor="?colorSurface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
@ -56,7 +55,6 @@
|
|||
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"
|
||||
|
@ -77,7 +75,6 @@
|
|||
android:layout_height="@dimen/tab_height"
|
||||
android:paddingStart="60dp"
|
||||
android:paddingEnd="8dp"
|
||||
app:cardBackgroundColor="?colorSurface"
|
||||
app:layout_collapseMode="pin" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
@ -92,15 +89,34 @@
|
|||
android:scrollbars="none"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
<LinearLayout
|
||||
android:id="@android:id/empty"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:padding="24dp"
|
||||
android:text="@string/empty"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
android:textColor="?colorOnSecondary" />
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
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>
|
||||
</LinearLayout>
|
|
@ -17,7 +17,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:background="?colorSurface"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
|
|
|
@ -89,355 +89,79 @@
|
|||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
<code.name.monkey.retromusic.views.SettingListItemView
|
||||
android:id="@+id/generalSettings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?rectSelector"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="72dp"
|
||||
android:orientation="horizontal">
|
||||
app:settingListItemIcon="@drawable/ic_theme_palette_white_24dp"
|
||||
app:settingListItemIconColor="@color/md_blue_A400"
|
||||
app:settingListItemText="@string/general_settings_summary"
|
||||
app:settingListItemTitle="@string/general_settings_title" />
|
||||
|
||||
<code.name.monkey.retromusic.views.ColorIconsImageView
|
||||
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
|
||||
<code.name.monkey.retromusic.views.SettingListItemView
|
||||
android:id="@+id/nowPlayingSettings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?rectSelector"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="72dp"
|
||||
android:orientation="horizontal">
|
||||
app:settingListItemIcon="@drawable/ic_play_circle_filled_white_24dp"
|
||||
app:settingListItemIconColor="@color/md_red_A400"
|
||||
app:settingListItemText="@string/now_playing_summary"
|
||||
app:settingListItemTitle="@string/now_playing" />
|
||||
|
||||
<code.name.monkey.retromusic.views.ColorIconsImageView
|
||||
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
|
||||
<code.name.monkey.retromusic.views.SettingListItemView
|
||||
android:id="@+id/audioSettings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?rectSelector"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="72dp"
|
||||
android:orientation="horizontal">
|
||||
app:settingListItemIcon="@drawable/ic_volume_up_white_24dp"
|
||||
app:settingListItemIconColor="@color/md_deep_purple_A400"
|
||||
app:settingListItemText="@string/audio_settings_summary"
|
||||
app:settingListItemTitle="@string/pref_header_audio" />
|
||||
|
||||
<code.name.monkey.retromusic.views.ColorIconsImageView
|
||||
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
|
||||
<code.name.monkey.retromusic.views.SettingListItemView
|
||||
android:id="@+id/personalizeSettings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?rectSelector"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="72dp"
|
||||
android:orientation="horizontal">
|
||||
app:settingListItemIcon="@drawable/ic_hdr_strong_white_24dp"
|
||||
app:settingListItemIconColor="@color/md_teal_A400"
|
||||
app:settingListItemText="@string/personalize_settings_summary"
|
||||
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
|
||||
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
|
||||
<code.name.monkey.retromusic.views.SettingListItemView
|
||||
android:id="@+id/imageSettings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?rectSelector"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="72dp"
|
||||
android:orientation="horizontal">
|
||||
app:settingListItemIcon="@drawable/ic_image_white_24dp"
|
||||
app:settingListItemIconColor="@color/md_deep_orange_A400"
|
||||
app:settingListItemText="@string/image_settings_summary"
|
||||
app:settingListItemTitle="@string/pref_header_images" />
|
||||
|
||||
<code.name.monkey.retromusic.views.ColorIconsImageView
|
||||
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
|
||||
<code.name.monkey.retromusic.views.SettingListItemView
|
||||
android:id="@+id/notificationSettings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?rectSelector"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="72dp"
|
||||
android:orientation="horizontal">
|
||||
app:settingListItemIcon="@drawable/ic_notifications_active_white_24dp"
|
||||
app:settingListItemIconColor="@color/md_yellow_A400"
|
||||
app:settingListItemText="@string/notification_settings_summary"
|
||||
app:settingListItemTitle="@string/notification" />
|
||||
|
||||
<code.name.monkey.retromusic.views.ColorIconsImageView
|
||||
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
|
||||
<code.name.monkey.retromusic.views.SettingListItemView
|
||||
android:id="@+id/otherSettings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?rectSelector"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="72dp"
|
||||
android:orientation="horizontal">
|
||||
app:settingListItemIcon="@drawable/ic_notifications_active_white_24dp"
|
||||
app:settingListItemIconColor="@color/md_indigo_A400"
|
||||
app:settingListItemText="@string/other_settings_summary"
|
||||
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
|
||||
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
|
||||
<code.name.monkey.retromusic.views.SettingListItemView
|
||||
android:id="@+id/aboutSettings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?rectSelector"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="72dp"
|
||||
android:orientation="horizontal">
|
||||
app:settingListItemIcon="@drawable/ic_info_outline_white_24dp"
|
||||
app:settingListItemIconColor="@color/md_light_green_A400"
|
||||
app:settingListItemText="@string/about_settings_summary"
|
||||
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>
|
||||
</androidx.core.widget.NestedScrollView>
|
|
@ -8,7 +8,6 @@
|
|||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingBottom="14dp"
|
||||
android:paddingEnd="8dp" >
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/icon"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -50,13 +50,14 @@
|
|||
android:gravity="center"
|
||||
android:textAppearance="@style/TextViewHeadline5"
|
||||
android:textStyle="bold"
|
||||
tools:text="Name" />
|
||||
tools:text="@tools:sample/full_names" />
|
||||
|
||||
<code.name.monkey.retromusic.views.BaselineGridTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:lineHeightHint="24sp"
|
||||
tools:text="role" />
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
|
@ -6,28 +6,23 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareCardView
|
||||
android:layout_width="136dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_margin="8dp"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardPreventCornerOverlap="true">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/imageContainerCard"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardPreventCornerOverlap="true">
|
||||
android:scaleType="centerCrop"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
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
|
||||
android:id="@+id/title"
|
||||
|
@ -35,7 +30,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:padding="10dp"
|
||||
android:padding="8dp"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:text="Song name" />
|
||||
</LinearLayout>
|
|
@ -55,6 +55,7 @@
|
|||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
app:layout_constraintTop_toBottomOf="@android:id/title"
|
||||
app:lineHeightHint="24sp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:maxLines="2"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
android:id="@android:id/summary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
|
||||
|
|
60
app/src/main/res/layout/list_setting_item_view.xml
Normal file
60
app/src/main/res/layout/list_setting_item_view.xml
Normal 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>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="toolbar_margin_horizontal">52dp</dimen>
|
||||
<dimen name="toolbar_margin_horizontal">8dp</dimen>
|
||||
</resources>
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2019 Hemanth Savarala.
|
||||
~
|
||||
~ Licensed under the GNU General Public License v3
|
||||
|
@ -46,14 +45,16 @@
|
|||
<item name="windowActionBarOverlay">true</item>
|
||||
<item name="toolbarPopupTheme">@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="rectSelector">@drawable/rect_selector_dark</item>
|
||||
<item name="roundSelector">@drawable/round_selector</item>
|
||||
<item name="rectSelector">@drawable/rect_selector</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/Widget.ActionButton.Overflow</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
|
||||
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
|
||||
<item name="android:windowLightNavigationBar">false</item>
|
||||
<!--Manual setting colors-->
|
||||
<item name="colorSurface">@color/darkColorSurface</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
<color name="darkColorOnPrimary">#ffffff</color>
|
||||
<color name="darkColorSecondary">#202124</color>
|
||||
<color name="darkColorBackground">#202124</color>
|
||||
<color name="darkColorSurface">#17181a</color>
|
||||
<color name="darkColorSurface">#202124</color>
|
||||
|
||||
<color name="blackColorPrimary">#000000</color>
|
||||
<color name="blackColorOnPrimary">#ffffff</color>
|
||||
<color name="blackColorSecondary">#000000</color>
|
||||
<color name="blackColorBackground">#000000</color>
|
||||
<color name="blackColorSurface">#17181a</color>
|
||||
<color name="blackColorSurface">#000000</color>
|
||||
|
||||
<color name="transparent">#00000000</color>
|
||||
<!-- card colors -->
|
||||
|
|
22
app/src/main/res/values/list_setting_item_view.xml
Normal file
22
app/src/main/res/values/list_setting_item_view.xml
Normal 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>
|
|
@ -813,4 +813,5 @@
|
|||
<string name="pref_header_advanced">Advanced</string>
|
||||
<string name="pref_header_blacklist">Blacklist</string>
|
||||
<string name="no_playing_queue">No songs playing</string>
|
||||
<string name="nothing_to_see">Nothing to see</string>
|
||||
</resources>
|
||||
|
|
|
@ -24,15 +24,15 @@
|
|||
<item name="md_font_body">@font/circular</item>
|
||||
<item name="md_font_button">@font/circular</item>
|
||||
<item name="md_color_button_text">@color/md_white_1000</item>
|
||||
<item name="md_background_color">@color/darkColorPrimary</item>
|
||||
<item name="md_background_color">@color/darkColorSurface</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="toolbarPopupTheme">@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="rectSelector">@drawable/rect_selector_dark</item>
|
||||
<item name="roundSelector">@drawable/round_selector</item>
|
||||
<item name="rectSelector">@drawable/rect_selector</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/Widget.ActionButton.Overflow</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
|
|
Loading…
Reference in a new issue