commit
7f2d43bfce
76 changed files with 1142 additions and 542 deletions
|
@ -31,8 +31,8 @@ android {
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|
||||||
applicationId "code.name.monkey.retromusic"
|
applicationId "code.name.monkey.retromusic"
|
||||||
versionCode 340
|
versionCode 341
|
||||||
versionName '3.2.125'
|
versionName '3.2.135'
|
||||||
|
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
|
|
|
@ -152,6 +152,17 @@
|
||||||
android:resource="@xml/provider_paths" />
|
android:resource="@xml/provider_paths" />
|
||||||
</provider>
|
</provider>
|
||||||
|
|
||||||
|
|
||||||
|
<provider
|
||||||
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
android:authorities="${applicationId}"
|
||||||
|
android:exported="false"
|
||||||
|
android:grantUriPermissions="true">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
android:resource="@xml/provider_paths" />
|
||||||
|
</provider>
|
||||||
|
|
||||||
<receiver android:name=".service.MediaButtonIntentReceiver">
|
<receiver android:name=".service.MediaButtonIntentReceiver">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -175,7 +175,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
super.onActivityResult(requestCode, resultCode, data)
|
super.onActivityResult(requestCode, resultCode, data)
|
||||||
when (requestCode) {
|
when (requestCode) {
|
||||||
REQUEST_CODE_SELECT_IMAGE -> if (resultCode == Activity.RESULT_OK) {
|
REQUEST_CODE_SELECT_IMAGE -> if (resultCode == Activity.RESULT_OK) {
|
||||||
CustomArtistImageUtil.getInstance(this).setCustomArtistImage(artist!!, data!!.data!!)
|
data?.data?.let { CustomArtistImageUtil.getInstance(this).setCustomArtistImage(artist, it) }
|
||||||
}
|
}
|
||||||
else -> if (resultCode == Activity.RESULT_OK) {
|
else -> if (resultCode == Activity.RESULT_OK) {
|
||||||
reload()
|
reload()
|
||||||
|
|
|
@ -24,7 +24,6 @@ import code.name.monkey.retromusic.loaders.AlbumLoader
|
||||||
import code.name.monkey.retromusic.loaders.ArtistLoader
|
import code.name.monkey.retromusic.loaders.ArtistLoader
|
||||||
import code.name.monkey.retromusic.loaders.PlaylistSongsLoader
|
import code.name.monkey.retromusic.loaders.PlaylistSongsLoader
|
||||||
import code.name.monkey.retromusic.service.MusicService
|
import code.name.monkey.retromusic.service.MusicService
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil
|
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import io.reactivex.disposables.CompositeDisposable
|
import io.reactivex.disposables.CompositeDisposable
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
@ -62,12 +61,17 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP
|
||||||
setDrawUnderStatusBar()
|
setDrawUnderStatusBar()
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
getBottomNavigationView().selectedItemId = PreferenceUtil.getInstance().lastPage
|
||||||
|
|
||||||
getBottomNavigationView().setOnNavigationItemSelectedListener {
|
getBottomNavigationView().setOnNavigationItemSelectedListener {
|
||||||
PreferenceUtil.getInstance().lastPage = it.itemId
|
PreferenceUtil.getInstance().lastPage = it.itemId
|
||||||
selectedFragment(it.itemId)
|
selectedFragment(it.itemId)
|
||||||
|
|
||||||
true
|
true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
selectedFragment(PreferenceUtil.getInstance().lastPage)
|
selectedFragment(PreferenceUtil.getInstance().lastPage)
|
||||||
} else {
|
} else {
|
||||||
|
@ -254,8 +258,10 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP
|
||||||
key == PreferenceUtil.ALBUM_COVER_STYLE ||
|
key == PreferenceUtil.ALBUM_COVER_STYLE ||
|
||||||
key == PreferenceUtil.HOME_ARTIST_GRID_STYLE ||
|
key == PreferenceUtil.HOME_ARTIST_GRID_STYLE ||
|
||||||
key == PreferenceUtil.ALBUM_COVER_TRANSFORM ||
|
key == PreferenceUtil.ALBUM_COVER_TRANSFORM ||
|
||||||
key == PreferenceUtil.TAB_TEXT_MODE)
|
key == PreferenceUtil.TAB_TEXT_MODE ||
|
||||||
|
key == PreferenceUtil.LIBRARY_CATEGORIES)
|
||||||
postRecreate()
|
postRecreate()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showPromotionalOffer() {
|
private fun showPromotionalOffer() {
|
||||||
|
@ -277,6 +283,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP
|
||||||
R.id.action_album,
|
R.id.action_album,
|
||||||
R.id.action_artist,
|
R.id.action_artist,
|
||||||
R.id.action_playlist,
|
R.id.action_playlist,
|
||||||
|
R.id.action_genre,
|
||||||
R.id.action_song -> setCurrentFragment(LibraryFragment.newInstance(itemId), false)
|
R.id.action_song -> setCurrentFragment(LibraryFragment.newInstance(itemId), false)
|
||||||
R.id.action_home -> setCurrentFragment(BannerHomeFragment.newInstance(), false)
|
R.id.action_home -> setCurrentFragment(BannerHomeFragment.newInstance(), false)
|
||||||
R.id.action_folder -> setCurrentFragment(FoldersFragment.newInstance(this), false)
|
R.id.action_folder -> setCurrentFragment(FoldersFragment.newInstance(this), false)
|
||||||
|
@ -296,8 +303,6 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val APP_INTRO_REQUEST = 2323
|
const val APP_INTRO_REQUEST = 2323
|
||||||
const val LIBRARY = 1
|
|
||||||
const val FOLDERS = 3
|
|
||||||
const val HOME = 0
|
const val HOME = 0
|
||||||
private const val TAG = "MainActivity"
|
private const val TAG = "MainActivity"
|
||||||
private const val APP_USER_INFO_REQUEST = 9003
|
private const val APP_USER_INFO_REQUEST = 9003
|
||||||
|
|
|
@ -61,6 +61,8 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
|
||||||
|
|
||||||
chooseFragmentForTheme()
|
chooseFragmentForTheme()
|
||||||
setupSlidingUpPanel()
|
setupSlidingUpPanel()
|
||||||
|
|
||||||
|
updateTabs()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
|
@ -307,4 +309,16 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun updateTabs() {
|
||||||
|
bottomNavigationView.menu.clear()
|
||||||
|
val currentTabs = PreferenceUtil.getInstance().libraryCategoryInfos
|
||||||
|
for (tab in currentTabs) {
|
||||||
|
if (tab.visible) {
|
||||||
|
val menu = tab.category;
|
||||||
|
bottomNavigationView.menu.add(0, menu.id, 0, menu.stringRes)
|
||||||
|
.setIcon(menu.icon)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -10,13 +10,14 @@ import android.view.WindowManager
|
||||||
import androidx.annotation.ColorInt
|
import androidx.annotation.ColorInt
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import code.name.monkey.appthemehelper.ATH
|
import code.name.monkey.appthemehelper.ATH
|
||||||
|
import code.name.monkey.appthemehelper.ATHActivity
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
import code.name.monkey.appthemehelper.util.*
|
import code.name.monkey.appthemehelper.util.*
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import code.name.monkey.retromusic.util.RetroUtil
|
import code.name.monkey.retromusic.util.RetroUtil
|
||||||
|
|
||||||
abstract class AbsThemeActivity : AbsCrashCollector(), Runnable {
|
abstract class AbsThemeActivity : ATHActivity(), Runnable {
|
||||||
|
|
||||||
private val handler = Handler()
|
private val handler = Handler()
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
* 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.adapter;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import code.name.monkey.retromusic.R;
|
||||||
|
import code.name.monkey.retromusic.model.CategoryInfo;
|
||||||
|
import code.name.monkey.retromusic.util.SwipeAndDragHelper;
|
||||||
|
|
||||||
|
public class CategoryInfoAdapter extends RecyclerView.Adapter<CategoryInfoAdapter.ViewHolder> implements SwipeAndDragHelper.ActionCompletionContract {
|
||||||
|
private List<CategoryInfo> categoryInfos;
|
||||||
|
private ItemTouchHelper touchHelper;
|
||||||
|
|
||||||
|
public CategoryInfoAdapter(@NonNull List<CategoryInfo> categoryInfos) {
|
||||||
|
this.categoryInfos = categoryInfos;
|
||||||
|
SwipeAndDragHelper swipeAndDragHelper = new SwipeAndDragHelper(this);
|
||||||
|
touchHelper = new ItemTouchHelper(swipeAndDragHelper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NonNull
|
||||||
|
public CategoryInfoAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.preference_dialog_library_categories_listitem, parent, false);
|
||||||
|
return new ViewHolder(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull CategoryInfoAdapter.ViewHolder holder, int position) {
|
||||||
|
CategoryInfo categoryInfo = categoryInfos.get(position);
|
||||||
|
|
||||||
|
holder.checkBox.setChecked(categoryInfo.visible);
|
||||||
|
holder.title.setText(holder.title.getResources().getString(categoryInfo.category.stringRes));
|
||||||
|
|
||||||
|
holder.itemView.setOnClickListener(v -> {
|
||||||
|
if (!(categoryInfo.visible && isLastCheckedCategory(categoryInfo))) {
|
||||||
|
categoryInfo.visible = !categoryInfo.visible;
|
||||||
|
holder.checkBox.setChecked(categoryInfo.visible);
|
||||||
|
} else {
|
||||||
|
Toast.makeText(holder.itemView.getContext(), R.string.you_have_to_select_at_least_one_category, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.dragView.setOnTouchListener((view, event) -> {
|
||||||
|
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
||||||
|
touchHelper.startDrag(holder);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return categoryInfos.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewMoved(int oldPosition, int newPosition) {
|
||||||
|
CategoryInfo categoryInfo = categoryInfos.get(oldPosition);
|
||||||
|
categoryInfos.remove(oldPosition);
|
||||||
|
categoryInfos.add(newPosition, categoryInfo);
|
||||||
|
notifyItemMoved(oldPosition, newPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void attachToRecyclerView(RecyclerView recyclerView) {
|
||||||
|
touchHelper.attachToRecyclerView(recyclerView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
public List<CategoryInfo> getCategoryInfos() {
|
||||||
|
return categoryInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryInfos(@NonNull List<CategoryInfo> categoryInfos) {
|
||||||
|
this.categoryInfos = categoryInfos;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isLastCheckedCategory(CategoryInfo categoryInfo) {
|
||||||
|
if (categoryInfo.visible) {
|
||||||
|
for (CategoryInfo c : categoryInfos) {
|
||||||
|
if (c != categoryInfo && c.visible) return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
CheckBox checkBox;
|
||||||
|
TextView title;
|
||||||
|
View dragView;
|
||||||
|
|
||||||
|
ViewHolder(View view) {
|
||||||
|
super(view);
|
||||||
|
checkBox = view.findViewById(R.id.checkbox);
|
||||||
|
title = view.findViewById(R.id.title);
|
||||||
|
dragView = view.findViewById(R.id.drag_view);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,14 +4,12 @@ import android.app.Activity
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
|
||||||
import java.util.ArrayList
|
|
||||||
import java.util.Locale
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.model.Genre
|
|
||||||
import code.name.monkey.retromusic.adapter.base.MediaEntryViewHolder
|
import code.name.monkey.retromusic.adapter.base.MediaEntryViewHolder
|
||||||
|
import code.name.monkey.retromusic.model.Genre
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil
|
import code.name.monkey.retromusic.util.NavigationUtil
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Hemanth S (h4h13).
|
* @author Hemanth S (h4h13).
|
||||||
|
@ -40,10 +38,6 @@ class GenreAdapter(private val mActivity: Activity, dataSet: ArrayList<Genre>, p
|
||||||
else
|
else
|
||||||
mActivity.getString(R.string.song))
|
mActivity.getString(R.string.song))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (holder.separator != null) {
|
|
||||||
holder.separator!!.visibility = View.GONE
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int {
|
override fun getItemCount(): Int {
|
||||||
|
@ -56,14 +50,6 @@ class GenreAdapter(private val mActivity: Activity, dataSet: ArrayList<Genre>, p
|
||||||
}
|
}
|
||||||
|
|
||||||
inner class ViewHolder(itemView: View) : MediaEntryViewHolder(itemView) {
|
inner class ViewHolder(itemView: View) : MediaEntryViewHolder(itemView) {
|
||||||
init {
|
|
||||||
if (menu != null) {
|
|
||||||
menu!!.visibility = View.GONE
|
|
||||||
}
|
|
||||||
assert(imageContainer != null)
|
|
||||||
imageContainer!!.visibility = View.GONE
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onClick(v: View?) {
|
override fun onClick(v: View?) {
|
||||||
super.onClick(v)
|
super.onClick(v)
|
||||||
val genre = dataSet[adapterPosition]
|
val genre = dataSet[adapterPosition]
|
||||||
|
|
|
@ -32,7 +32,6 @@ class HomeAdapter(private val activity: AppCompatActivity, private var homes: Li
|
||||||
val layout = LayoutInflater.from(activity).inflate(R.layout.section_recycler_view, parent, false)
|
val layout = LayoutInflater.from(activity).inflate(R.layout.section_recycler_view, parent, false)
|
||||||
return when (viewType) {
|
return when (viewType) {
|
||||||
RECENT_ARTISTS, TOP_ARTISTS -> ArtistViewHolder(layout)
|
RECENT_ARTISTS, TOP_ARTISTS -> ArtistViewHolder(layout)
|
||||||
GENRES -> GenreViewHolder(layout)
|
|
||||||
PLAYLISTS -> PlaylistViewHolder(layout)
|
PLAYLISTS -> PlaylistViewHolder(layout)
|
||||||
else -> {
|
else -> {
|
||||||
AlbumViewHolder(LayoutInflater.from(activity).inflate(R.layout.metal_section_recycler_view, parent, false))
|
AlbumViewHolder(LayoutInflater.from(activity).inflate(R.layout.metal_section_recycler_view, parent, false))
|
||||||
|
@ -52,10 +51,6 @@ class HomeAdapter(private val activity: AppCompatActivity, private var homes: Li
|
||||||
val viewHolder = holder as ArtistViewHolder
|
val viewHolder = holder as ArtistViewHolder
|
||||||
viewHolder.bindView(home)
|
viewHolder.bindView(home)
|
||||||
}
|
}
|
||||||
GENRES -> {
|
|
||||||
val viewHolder = holder as GenreViewHolder
|
|
||||||
viewHolder.bindView(home)
|
|
||||||
}
|
|
||||||
PLAYLISTS -> {
|
PLAYLISTS -> {
|
||||||
val viewHolder = holder as PlaylistViewHolder
|
val viewHolder = holder as PlaylistViewHolder
|
||||||
viewHolder.bindView(home)
|
viewHolder.bindView(home)
|
||||||
|
@ -108,20 +103,6 @@ class HomeAdapter(private val activity: AppCompatActivity, private var homes: Li
|
||||||
chip.setChipIconResource(home.icon)
|
chip.setChipIconResource(home.icon)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private inner class GenreViewHolder(view: View) : AbsHomeViewItem(view) {
|
|
||||||
fun bindView(home: Home) {
|
|
||||||
recyclerView.apply {
|
|
||||||
val genreAdapter = GenreAdapter(activity, home.arrayList as ArrayList<Genre>, R.layout.item_list)
|
|
||||||
layoutManager = LinearLayoutManager(context)
|
|
||||||
adapter = genreAdapter
|
|
||||||
|
|
||||||
}
|
|
||||||
chip.text = activity.getString(home.title)
|
|
||||||
chip.setChipIconResource(home.icon)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private inner class PlaylistViewHolder(view: View) : AbsHomeViewItem(view) {
|
private inner class PlaylistViewHolder(view: View) : AbsHomeViewItem(view) {
|
||||||
fun bindView(home: Home) {
|
fun bindView(home: Home) {
|
||||||
val songs = PlaylistSongsLoader.getPlaylistSongList(activity, home.arrayList[0] as Playlist).blockingFirst()
|
val songs = PlaylistSongsLoader.getPlaylistSongList(activity, home.arrayList[0] as Playlist).blockingFirst()
|
||||||
|
|
|
@ -127,6 +127,7 @@ class VolumeFragment : Fragment(), SeekBar.OnSeekBarChangeListener, OnAudioVolum
|
||||||
fun setTintableColor(color: Int) {
|
fun setTintableColor(color: Int) {
|
||||||
volumeDown.setColorFilter(color, PorterDuff.Mode.SRC_IN)
|
volumeDown.setColorFilter(color, PorterDuff.Mode.SRC_IN)
|
||||||
volumeUp.setColorFilter(color, PorterDuff.Mode.SRC_IN)
|
volumeUp.setColorFilter(color, PorterDuff.Mode.SRC_IN)
|
||||||
|
//TintHelper.setTint(volumeSeekBar, color, false)
|
||||||
ViewUtil.setProgressDrawable(volumeSeekBar, color, true)
|
ViewUtil.setProgressDrawable(volumeSeekBar, color, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,11 @@ package code.name.monkey.retromusic.fragments.mainactivity
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
import code.name.monkey.retromusic.adapter.album.AlbumAdapter
|
||||||
|
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
|
||||||
import code.name.monkey.retromusic.model.Album
|
import code.name.monkey.retromusic.model.Album
|
||||||
import code.name.monkey.retromusic.mvp.contract.AlbumContract
|
import code.name.monkey.retromusic.mvp.contract.AlbumContract
|
||||||
import code.name.monkey.retromusic.mvp.presenter.AlbumPresenter
|
import code.name.monkey.retromusic.mvp.presenter.AlbumPresenter
|
||||||
import code.name.monkey.retromusic.adapter.album.AlbumAdapter
|
|
||||||
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
|
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
|
|
||||||
open class AlbumsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridLayoutManager>(), AlbumContract.AlbumView {
|
open class AlbumsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridLayoutManager>(), AlbumContract.AlbumView {
|
||||||
|
@ -95,23 +95,9 @@ open class AlbumsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Al
|
||||||
presenter = AlbumPresenter(this)
|
presenter = AlbumPresenter(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setMenuVisibility(menuVisible: Boolean) {
|
|
||||||
super.setMenuVisibility(menuVisible)
|
|
||||||
if (menuVisible) {
|
|
||||||
|
|
||||||
libraryFragment.setTitle(
|
|
||||||
if (PreferenceUtil.getInstance().tabTitles())
|
|
||||||
R.string.library
|
|
||||||
else
|
|
||||||
R.string.albums)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
|
||||||
libraryFragment.setTitle(
|
|
||||||
if (PreferenceUtil.getInstance().tabTitles()) R.string.library else R.string.albums)
|
|
||||||
if (adapter!!.dataSet.isEmpty()) {
|
if (adapter!!.dataSet.isEmpty()) {
|
||||||
presenter.subscribe()
|
presenter.subscribe()
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,11 @@ package code.name.monkey.retromusic.fragments.mainactivity
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
import code.name.monkey.retromusic.adapter.artist.ArtistAdapter
|
||||||
|
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
|
||||||
import code.name.monkey.retromusic.model.Artist
|
import code.name.monkey.retromusic.model.Artist
|
||||||
import code.name.monkey.retromusic.mvp.contract.ArtistContract
|
import code.name.monkey.retromusic.mvp.contract.ArtistContract
|
||||||
import code.name.monkey.retromusic.mvp.presenter.ArtistPresenter
|
import code.name.monkey.retromusic.mvp.presenter.ArtistPresenter
|
||||||
import code.name.monkey.retromusic.adapter.artist.ArtistAdapter
|
|
||||||
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
|
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
@ -86,22 +86,8 @@ class ArtistsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Artist
|
||||||
presenter.loadArtists()
|
presenter.loadArtists()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun setMenuVisibility(menuVisible: Boolean) {
|
|
||||||
super.setMenuVisibility(menuVisible)
|
|
||||||
if (menuVisible) {
|
|
||||||
libraryFragment.setTitle(
|
|
||||||
if (PreferenceUtil.getInstance().tabTitles())
|
|
||||||
R.string.library
|
|
||||||
else
|
|
||||||
R.string.artists)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
libraryFragment.setTitle(
|
|
||||||
if (PreferenceUtil.getInstance().tabTitles()) R.string.library else R.string.artists)
|
|
||||||
if (adapter!!.dataSet.isEmpty()) {
|
if (adapter!!.dataSet.isEmpty()) {
|
||||||
presenter.subscribe()
|
presenter.subscribe()
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
/*
|
||||||
|
* 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.fragments.mainactivity
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import code.name.monkey.retromusic.R
|
||||||
|
import code.name.monkey.retromusic.adapter.GenreAdapter
|
||||||
|
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewFragment
|
||||||
|
import code.name.monkey.retromusic.model.Genre
|
||||||
|
import code.name.monkey.retromusic.mvp.contract.GenreContract
|
||||||
|
import code.name.monkey.retromusic.mvp.presenter.GenrePresenter
|
||||||
|
|
||||||
|
|
||||||
|
class GenresFragment : AbsLibraryPagerRecyclerViewFragment<GenreAdapter, LinearLayoutManager>(), GenreContract.GenreView {
|
||||||
|
override fun loading() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun showData(list: ArrayList<Genre>) {
|
||||||
|
adapter?.swapDataSet(list)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun showEmptyView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun completed() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun createLayoutManager(): LinearLayoutManager {
|
||||||
|
return LinearLayoutManager(activity)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun createAdapter(): GenreAdapter {
|
||||||
|
val dataSet = if (adapter == null) ArrayList() else adapter!!.dataSet
|
||||||
|
return GenreAdapter(libraryFragment.mainActivity, dataSet, R.layout.item_list_no_image)
|
||||||
|
}
|
||||||
|
|
||||||
|
override val emptyMessage: Int
|
||||||
|
get() = R.string.no_genres
|
||||||
|
|
||||||
|
private lateinit var presenter: GenrePresenter
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
presenter = GenrePresenter(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
if (adapter!!.dataSet.isEmpty()) {
|
||||||
|
presenter.subscribe()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
presenter.unsubscribe()
|
||||||
|
super.onDestroy()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onMediaStoreChanged() {
|
||||||
|
presenter.loadGenre()
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
|
||||||
|
fun newInstance(): GenresFragment {
|
||||||
|
return GenresFragment()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
package code.name.monkey.retromusic.fragments.mainactivity;
|
package code.name.monkey.retromusic.fragments.mainactivity;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.graphics.Color;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
@ -26,10 +26,11 @@ import com.google.android.material.card.MaterialCardView;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
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.TintHelper;
|
import code.name.monkey.appthemehelper.util.TintHelper;
|
||||||
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;
|
||||||
|
@ -40,11 +41,12 @@ import code.name.monkey.retromusic.helper.SortOrder;
|
||||||
import code.name.monkey.retromusic.interfaces.CabHolder;
|
import code.name.monkey.retromusic.interfaces.CabHolder;
|
||||||
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks;
|
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks;
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil;
|
import code.name.monkey.retromusic.util.NavigationUtil;
|
||||||
|
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||||
import code.name.monkey.retromusic.util.RetroColorUtil;
|
import code.name.monkey.retromusic.util.RetroColorUtil;
|
||||||
import code.name.monkey.retromusic.util.RetroUtil;
|
import code.name.monkey.retromusic.util.RetroUtil;
|
||||||
import io.reactivex.disposables.CompositeDisposable;
|
import io.reactivex.disposables.CompositeDisposable;
|
||||||
|
|
||||||
public class LibraryFragment extends AbsMainActivityFragment implements CabHolder, MainActivityFragmentCallbacks {
|
public class LibraryFragment extends AbsMainActivityFragment implements CabHolder, MainActivityFragmentCallbacks, SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
|
|
||||||
public static final String TAG = "LibraryFragment";
|
public static final String TAG = "LibraryFragment";
|
||||||
private static final String CURRENT_TAB_ID = "current_tab_id";
|
private static final String CURRENT_TAB_ID = "current_tab_id";
|
||||||
|
@ -77,6 +79,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
disposable.dispose();
|
disposable.dispose();
|
||||||
|
PreferenceUtil.getInstance().unregisterOnSharedPreferenceChangedListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -89,7 +92,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
toolbarContainer = view.findViewById(R.id.toolbarContainer);
|
toolbarContainer = view.findViewById(R.id.toolbarContainer);
|
||||||
appBarLayout = view.findViewById(R.id.appBarLayout);
|
appBarLayout = view.findViewById(R.id.appBarLayout);
|
||||||
toolbar = view.findViewById(R.id.toolbar);
|
toolbar = view.findViewById(R.id.toolbar);
|
||||||
|
PreferenceUtil.getInstance().registerOnSharedPreferenceChangedListener(this);
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,6 +140,9 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
case R.id.action_playlist:
|
case R.id.action_playlist:
|
||||||
selectedFragment(PlaylistsFragment.Companion.newInstance());
|
selectedFragment(PlaylistsFragment.Companion.newInstance());
|
||||||
break;
|
break;
|
||||||
|
case R.id.action_genre:
|
||||||
|
selectedFragment(GenresFragment.Companion.newInstance());
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,13 +150,13 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
private void setupToolbar() {
|
private void setupToolbar() {
|
||||||
int primaryColor = ThemeStore.Companion.primaryColor(getContext());
|
int primaryColor = ThemeStore.Companion.primaryColor(getContext());
|
||||||
TintHelper.setTintAuto(contentContainer, primaryColor, true);
|
TintHelper.setTintAuto(contentContainer, primaryColor, true);
|
||||||
|
appBarLayout.setBackgroundColor(primaryColor);
|
||||||
toolbar.setBackgroundColor(RetroColorUtil.toolbarColor(getMainActivity()));
|
toolbar.setBackgroundColor(RetroColorUtil.toolbarColor(getMainActivity()));
|
||||||
toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp);
|
toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp);
|
||||||
toolbar.setOnClickListener(v -> {
|
toolbar.setOnClickListener(v -> {
|
||||||
Pair<View, String> pair = new Pair<>(toolbarContainer, getString(R.string.transition_toolbar));
|
Pair<View, String> pair = new Pair<>(toolbarContainer, getString(R.string.transition_toolbar));
|
||||||
NavigationUtil.goToSearch(getMainActivity(), pair);
|
NavigationUtil.goToSearch(getMainActivity(), pair);
|
||||||
});
|
});
|
||||||
appBarLayout.setBackgroundColor(primaryColor);
|
|
||||||
appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) ->
|
appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) ->
|
||||||
getMainActivity().setLightStatusbar(!ATHUtil.INSTANCE.isWindowBackgroundDark(getContext())));
|
getMainActivity().setLightStatusbar(!ATHUtil.INSTANCE.isWindowBackgroundDark(getContext())));
|
||||||
getMainActivity().setSupportActionBar(toolbar);
|
getMainActivity().setSupportActionBar(toolbar);
|
||||||
|
@ -187,12 +193,12 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
if (cab != null && cab.isActive()) {
|
if (cab != null && cab.isActive()) {
|
||||||
cab.finish();
|
cab.finish();
|
||||||
}
|
}
|
||||||
//noinspection ConstantConditions
|
|
||||||
cab = new MaterialCab(getMainActivity(), R.id.cab_stub)
|
cab = new MaterialCab(getMainActivity(), R.id.cab_stub)
|
||||||
.setMenu(menuRes)
|
.setMenu(menuRes)
|
||||||
.setCloseDrawableRes(R.drawable.ic_close_white_24dp)
|
.setCloseDrawableRes(R.drawable.ic_close_white_24dp)
|
||||||
.setBackgroundColor(
|
.setBackgroundColor(
|
||||||
RetroColorUtil.shiftBackgroundColorForLightText(ThemeStore.Companion.primaryColor(getActivity())))
|
RetroColorUtil.shiftBackgroundColorForLightText(ThemeStore.Companion.primaryColor(Objects.requireNonNull(getActivity()))))
|
||||||
.start(callback);
|
.start(callback);
|
||||||
return cab;
|
return cab;
|
||||||
}
|
}
|
||||||
|
@ -461,4 +467,12 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSharedPreferenceChanged(@NonNull SharedPreferences sharedPreferences,
|
||||||
|
@NonNull String key) {
|
||||||
|
if (key.equals(PreferenceUtil.LIBRARY_CATEGORIES)){
|
||||||
|
Fragment fragment= getCurrentFragment();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -5,12 +5,11 @@ import android.view.Menu
|
||||||
import android.view.MenuInflater
|
import android.view.MenuInflater
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
import code.name.monkey.retromusic.adapter.playlist.PlaylistAdapter
|
||||||
|
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewFragment
|
||||||
import code.name.monkey.retromusic.model.Playlist
|
import code.name.monkey.retromusic.model.Playlist
|
||||||
import code.name.monkey.retromusic.mvp.contract.PlaylistContract
|
import code.name.monkey.retromusic.mvp.contract.PlaylistContract
|
||||||
import code.name.monkey.retromusic.mvp.presenter.PlaylistPresenter
|
import code.name.monkey.retromusic.mvp.presenter.PlaylistPresenter
|
||||||
import code.name.monkey.retromusic.adapter.playlist.PlaylistAdapter
|
|
||||||
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewFragment
|
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,16 +35,8 @@ class PlaylistsFragment : AbsLibraryPagerRecyclerViewFragment<PlaylistAdapter, L
|
||||||
R.layout.item_list, libraryFragment)
|
R.layout.item_list, libraryFragment)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setMenuVisibility(menuVisible: Boolean) {
|
|
||||||
super.setMenuVisibility(menuVisible)
|
|
||||||
if (menuVisible) {
|
|
||||||
libraryFragment.setTitle(if (PreferenceUtil.getInstance().tabTitles()) R.string.library else R.string.playlists)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
libraryFragment.setTitle(if (PreferenceUtil.getInstance().tabTitles()) R.string.library else R.string.playlists)
|
|
||||||
if (adapter!!.dataSet.isEmpty()) {
|
if (adapter!!.dataSet.isEmpty()) {
|
||||||
presenter.subscribe()
|
presenter.subscribe()
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,13 @@ package code.name.monkey.retromusic.fragments.mainactivity
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
|
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.model.Song
|
|
||||||
import code.name.monkey.retromusic.mvp.contract.SongContract
|
|
||||||
import code.name.monkey.retromusic.mvp.presenter.SongPresenter
|
|
||||||
import code.name.monkey.retromusic.adapter.song.ShuffleButtonSongAdapter
|
import code.name.monkey.retromusic.adapter.song.ShuffleButtonSongAdapter
|
||||||
import code.name.monkey.retromusic.adapter.song.SongAdapter
|
import code.name.monkey.retromusic.adapter.song.SongAdapter
|
||||||
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
|
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
|
||||||
|
import code.name.monkey.retromusic.model.Song
|
||||||
|
import code.name.monkey.retromusic.mvp.contract.SongContract
|
||||||
|
import code.name.monkey.retromusic.mvp.presenter.SongPresenter
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
@ -81,23 +80,11 @@ class SongsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<SongAdap
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
libraryFragment.setTitle(if (PreferenceUtil.getInstance().tabTitles()) R.string.library else R.string.songs)
|
|
||||||
if (adapter!!.dataSet.isEmpty()) {
|
if (adapter!!.dataSet.isEmpty()) {
|
||||||
presenter.subscribe()
|
presenter.subscribe()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setMenuVisibility(menuVisible: Boolean) {
|
|
||||||
super.setMenuVisibility(menuVisible)
|
|
||||||
if (menuVisible) {
|
|
||||||
libraryFragment.setTitle(
|
|
||||||
if (PreferenceUtil.getInstance().tabTitles())
|
|
||||||
R.string.library
|
|
||||||
else
|
|
||||||
R.string.songs)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
presenter.unsubscribe()
|
presenter.unsubscribe()
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
|
|
|
@ -108,6 +108,7 @@ class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||||
text.setTextColor(lastDisabledPlaybackControlsColor)
|
text.setTextColor(lastDisabledPlaybackControlsColor)
|
||||||
|
|
||||||
setFabColor(lastPlaybackControlsColor)
|
setFabColor(lastPlaybackControlsColor)
|
||||||
|
ViewUtil.setProgressDrawable(progressSlider, lastPlaybackControlsColor)
|
||||||
songCurrentProgress.setTextColor(lastPlaybackControlsColor)
|
songCurrentProgress.setTextColor(lastPlaybackControlsColor)
|
||||||
songTotalTime.setTextColor(lastPlaybackControlsColor)
|
songTotalTime.setTextColor(lastPlaybackControlsColor)
|
||||||
|
|
||||||
|
@ -120,11 +121,6 @@ class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||||
private fun setFabColor(i: Int) {
|
private fun setFabColor(i: Int) {
|
||||||
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(i)), false)
|
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(i)), false)
|
||||||
TintHelper.setTintAuto(playPauseButton, i, true)
|
TintHelper.setTintAuto(playPauseButton, i, true)
|
||||||
setProgressBarColor(i)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setProgressBarColor(newColor: Int) {
|
|
||||||
ViewUtil.setProgressDrawable(progressSlider, newColor)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setUpPlayPauseFab() {
|
private fun setUpPlayPauseFab() {
|
||||||
|
|
|
@ -265,9 +265,9 @@ class ColorFragment : AbsPlayerFragment() {
|
||||||
override fun onPostExecute(l: Lyrics?) {
|
override fun onPostExecute(l: Lyrics?) {
|
||||||
lyricsColor = l
|
lyricsColor = l
|
||||||
if (lyricsColor == null) {
|
if (lyricsColor == null) {
|
||||||
lyricsView.setText(R.string.no_lyrics_found)
|
lyricsView?.setText(R.string.no_lyrics_found)
|
||||||
} else {
|
} else {
|
||||||
lyricsView.text = lyricsColor!!.text
|
lyricsView?.text = lyricsColor!!.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,14 @@ import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
||||||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||||
import code.name.monkey.retromusic.service.MusicService
|
import code.name.monkey.retromusic.service.MusicService
|
||||||
import code.name.monkey.retromusic.util.MusicUtil
|
import code.name.monkey.retromusic.util.MusicUtil
|
||||||
|
import code.name.monkey.retromusic.util.ViewUtil
|
||||||
import kotlinx.android.synthetic.main.fragment_color_player_playback_controls.*
|
import kotlinx.android.synthetic.main.fragment_color_player_playback_controls.*
|
||||||
|
import kotlinx.android.synthetic.main.fragment_color_player_playback_controls.progressSlider
|
||||||
|
import kotlinx.android.synthetic.main.fragment_color_player_playback_controls.songCurrentProgress
|
||||||
|
import kotlinx.android.synthetic.main.fragment_color_player_playback_controls.songTotalTime
|
||||||
|
import kotlinx.android.synthetic.main.fragment_color_player_playback_controls.text
|
||||||
|
import kotlinx.android.synthetic.main.fragment_color_player_playback_controls.title
|
||||||
|
import kotlinx.android.synthetic.main.fragment_player_playback_controls.*
|
||||||
import kotlinx.android.synthetic.main.media_button.*
|
import kotlinx.android.synthetic.main.media_button.*
|
||||||
|
|
||||||
class ColorPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
class ColorPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||||
|
@ -99,7 +106,7 @@ class ColorPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||||
title!!.setTextColor(lastPlaybackControlsColor)
|
title!!.setTextColor(lastPlaybackControlsColor)
|
||||||
text!!.setTextColor(lastDisabledPlaybackControlsColor)
|
text!!.setTextColor(lastDisabledPlaybackControlsColor)
|
||||||
|
|
||||||
TintHelper.setTintAuto(progressSlider, lastPlaybackControlsColor, false)
|
ViewUtil.setProgressDrawable(progressSlider, lastPlaybackControlsColor)
|
||||||
|
|
||||||
volumeFragment?.setTintableColor(lastPlaybackControlsColor)
|
volumeFragment?.setTintableColor(lastPlaybackControlsColor)
|
||||||
|
|
||||||
|
|
|
@ -30,12 +30,12 @@ import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper
|
import code.name.monkey.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.extensions.ripAlpha
|
import code.name.monkey.retromusic.extensions.ripAlpha
|
||||||
|
import code.name.monkey.retromusic.fragments.base.AbsPlayerControlsFragment
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||||
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
||||||
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
||||||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||||
import code.name.monkey.retromusic.service.MusicService
|
import code.name.monkey.retromusic.service.MusicService
|
||||||
import code.name.monkey.retromusic.fragments.base.AbsPlayerControlsFragment
|
|
||||||
import code.name.monkey.retromusic.util.MusicUtil
|
import code.name.monkey.retromusic.util.MusicUtil
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import code.name.monkey.retromusic.util.ViewUtil
|
import code.name.monkey.retromusic.util.ViewUtil
|
||||||
|
@ -124,10 +124,10 @@ class LockScreenPlayerControlsFragment : AbsPlayerControlsFragment() {
|
||||||
val colorFinal = if (PreferenceUtil.getInstance().adaptiveColor) {
|
val colorFinal = if (PreferenceUtil.getInstance().adaptiveColor) {
|
||||||
color
|
color
|
||||||
} else {
|
} else {
|
||||||
ThemeStore.textColorSecondary(context!!).ripAlpha()
|
ThemeStore.textColorSecondary(context!!)
|
||||||
}
|
}
|
||||||
volumeFragment?.setTintable(colorFinal)
|
volumeFragment?.setTintable(colorFinal)
|
||||||
ViewUtil.setProgressDrawable(progressSlider, ColorUtil.stripAlpha(colorFinal), true)
|
ViewUtil.setProgressDrawable(progressSlider, colorFinal.ripAlpha(), true)
|
||||||
|
|
||||||
updatePrevNextColor()
|
updatePrevNextColor()
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,12 @@ import code.name.monkey.appthemehelper.util.ColorUtil
|
||||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.extensions.ripAlpha
|
import code.name.monkey.retromusic.extensions.ripAlpha
|
||||||
|
import code.name.monkey.retromusic.fragments.base.AbsPlayerControlsFragment
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||||
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
||||||
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
||||||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||||
import code.name.monkey.retromusic.service.MusicService
|
import code.name.monkey.retromusic.service.MusicService
|
||||||
import code.name.monkey.retromusic.fragments.base.AbsPlayerControlsFragment
|
|
||||||
import code.name.monkey.retromusic.util.MusicUtil
|
import code.name.monkey.retromusic.util.MusicUtil
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import code.name.monkey.retromusic.util.ViewUtil
|
import code.name.monkey.retromusic.util.ViewUtil
|
||||||
|
@ -107,10 +107,11 @@ class MaterialControlsFragment : AbsPlayerControlsFragment() {
|
||||||
lastPlaybackControlsColor = color
|
lastPlaybackControlsColor = color
|
||||||
color
|
color
|
||||||
} else {
|
} else {
|
||||||
ThemeStore.textColorSecondary(context!!).ripAlpha()
|
ThemeStore.textColorSecondary(context!!)
|
||||||
}
|
}.ripAlpha()
|
||||||
|
|
||||||
text.setTextColor(colorFinal)
|
text.setTextColor(colorFinal)
|
||||||
ViewUtil.setProgressDrawable(progressSlider, ColorUtil.stripAlpha(colorFinal), true)
|
ViewUtil.setProgressDrawable(progressSlider, colorFinal, true)
|
||||||
|
|
||||||
volumeFragment?.setTintable(colorFinal)
|
volumeFragment?.setTintable(colorFinal)
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,12 @@ import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper
|
import code.name.monkey.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.extensions.ripAlpha
|
import code.name.monkey.retromusic.extensions.ripAlpha
|
||||||
|
import code.name.monkey.retromusic.fragments.base.AbsPlayerControlsFragment
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||||
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
||||||
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
||||||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||||
import code.name.monkey.retromusic.service.MusicService
|
import code.name.monkey.retromusic.service.MusicService
|
||||||
import code.name.monkey.retromusic.fragments.base.AbsPlayerControlsFragment
|
|
||||||
import code.name.monkey.retromusic.util.MusicUtil
|
import code.name.monkey.retromusic.util.MusicUtil
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import code.name.monkey.retromusic.util.ViewUtil
|
import code.name.monkey.retromusic.util.ViewUtil
|
||||||
|
@ -72,12 +72,13 @@ class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||||
val colorFinal = if (PreferenceUtil.getInstance().adaptiveColor) {
|
val colorFinal = if (PreferenceUtil.getInstance().adaptiveColor) {
|
||||||
color
|
color
|
||||||
} else {
|
} else {
|
||||||
ThemeStore.accentColor(context!!).ripAlpha()
|
ThemeStore.accentColor(context!!)
|
||||||
}
|
}
|
||||||
|
|
||||||
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context!!, ColorUtil.isColorLight(colorFinal)), false)
|
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context!!, ColorUtil.isColorLight(colorFinal)), false)
|
||||||
TintHelper.setTintAuto(playPauseButton, colorFinal, true)
|
TintHelper.setTintAuto(playPauseButton, colorFinal, true)
|
||||||
ViewUtil.setProgressDrawable(progressSlider, colorFinal)
|
|
||||||
|
ViewUtil.setProgressDrawable(progressSlider, colorFinal.ripAlpha(), false)
|
||||||
|
|
||||||
volumeFragment?.setTintable(colorFinal)
|
volumeFragment?.setTintable(colorFinal)
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ import code.name.monkey.appthemehelper.util.ColorUtil
|
||||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper
|
import code.name.monkey.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
import code.name.monkey.retromusic.extensions.ripAlpha
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||||
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
||||||
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
||||||
|
@ -26,8 +27,15 @@ import code.name.monkey.retromusic.fragments.base.AbsPlayerControlsFragment
|
||||||
import code.name.monkey.retromusic.util.MusicUtil
|
import code.name.monkey.retromusic.util.MusicUtil
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import code.name.monkey.retromusic.util.ViewUtil
|
import code.name.monkey.retromusic.util.ViewUtil
|
||||||
|
import kotlinx.android.synthetic.main.fragment_flat_player_playback_controls.*
|
||||||
import kotlinx.android.synthetic.main.fragment_plain_controls_fragment.*
|
import kotlinx.android.synthetic.main.fragment_plain_controls_fragment.*
|
||||||
|
import kotlinx.android.synthetic.main.fragment_plain_controls_fragment.progressSlider
|
||||||
|
import kotlinx.android.synthetic.main.fragment_plain_controls_fragment.songCurrentProgress
|
||||||
|
import kotlinx.android.synthetic.main.fragment_plain_controls_fragment.songTotalTime
|
||||||
import kotlinx.android.synthetic.main.media_button.*
|
import kotlinx.android.synthetic.main.media_button.*
|
||||||
|
import kotlinx.android.synthetic.main.media_button.playPauseButton
|
||||||
|
import kotlinx.android.synthetic.main.media_button.repeatButton
|
||||||
|
import kotlinx.android.synthetic.main.media_button.shuffleButton
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Hemanth S (h4h13).
|
* @author Hemanth S (h4h13).
|
||||||
|
@ -136,18 +144,14 @@ class PlainPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
||||||
|
|
||||||
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context!!, ColorUtil.isColorLight(colorFinal)), false)
|
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context!!, ColorUtil.isColorLight(colorFinal)), false)
|
||||||
TintHelper.setTintAuto(playPauseButton, colorFinal, true)
|
TintHelper.setTintAuto(playPauseButton, colorFinal, true)
|
||||||
setProgressBarColor(colorFinal)
|
|
||||||
|
ViewUtil.setProgressDrawable(progressSlider, colorFinal.ripAlpha(), true)
|
||||||
|
|
||||||
updateRepeatState()
|
updateRepeatState()
|
||||||
updateShuffleState()
|
updateShuffleState()
|
||||||
updatePrevNextColor()
|
updatePrevNextColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setProgressBarColor(newColor: Int) {
|
|
||||||
progressSlider.thumbTintList = ColorStateList.valueOf(newColor)
|
|
||||||
ViewUtil.setProgressDrawable(progressSlider, newColor)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setUpShuffleButton() {
|
private fun setUpShuffleButton() {
|
||||||
shuffleButton.setOnClickListener { MusicPlayerRemote.toggleShuffleMode() }
|
shuffleButton.setOnClickListener { MusicPlayerRemote.toggleShuffleMode() }
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,13 +71,14 @@ abstract class AbsSettingsFragment : PreferenceFragmentCompat() {
|
||||||
var dialogFragment: DialogFragment? = null// Dialog creation could not be handled here. Try with the super method.
|
var dialogFragment: DialogFragment? = null// Dialog creation could not be handled here. Try with the super method.
|
||||||
// The dialog was created (it was one of our custom Preferences), show the dialog for it
|
// The dialog was created (it was one of our custom Preferences), show the dialog for it
|
||||||
when (preference) {
|
when (preference) {
|
||||||
|
is LibraryPreference -> dialogFragment = LibraryPreferenceDialog.newInstance(preference.key)
|
||||||
is NowPlayingScreenPreference -> dialogFragment = NowPlayingScreenPreferenceDialog.newInstance(preference.key)
|
is NowPlayingScreenPreference -> dialogFragment = NowPlayingScreenPreferenceDialog.newInstance(preference.key)
|
||||||
is AlbumCoverStylePreference -> dialogFragment = AlbumCoverStylePreferenceDialog.newInstance(preference.key)
|
is AlbumCoverStylePreference -> dialogFragment = AlbumCoverStylePreferenceDialog.newInstance(preference.key)
|
||||||
is MaterialListPreference -> {
|
is MaterialListPreference -> {
|
||||||
preference.entries
|
preference.entries
|
||||||
dialogFragment = MaterialListPreferenceDialog.newInstance(preference)
|
dialogFragment = MaterialListPreferenceDialog.newInstance(preference)
|
||||||
}
|
}
|
||||||
is BlacklistPreference -> dialogFragment = BlacklistPreferenceDialog.newInstance(preference.key)
|
is BlacklistPreference -> dialogFragment = BlacklistPreferenceDialog.newInstance()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dialogFragment != null) {
|
if (dialogFragment != null) {
|
||||||
|
|
|
@ -0,0 +1,75 @@
|
||||||
|
/*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
import code.name.monkey.retromusic.R;
|
||||||
|
|
||||||
|
|
||||||
|
public class CategoryInfo implements Parcelable {
|
||||||
|
public static final Creator<CategoryInfo> CREATOR = new Creator<CategoryInfo>() {
|
||||||
|
public CategoryInfo createFromParcel(Parcel source) {
|
||||||
|
return new CategoryInfo(source);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CategoryInfo[] newArray(int size) {
|
||||||
|
return new CategoryInfo[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
public Category category;
|
||||||
|
public boolean visible;
|
||||||
|
|
||||||
|
public CategoryInfo(Category category, boolean visible) {
|
||||||
|
this.category = category;
|
||||||
|
this.visible = visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private CategoryInfo(Parcel source) {
|
||||||
|
category = (Category) source.readSerializable();
|
||||||
|
visible = source.readInt() == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel dest, int flags) {
|
||||||
|
dest.writeSerializable(category);
|
||||||
|
dest.writeInt(visible ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Category {
|
||||||
|
HOME(R.id.action_home, R.string.home, R.drawable.toggle_home),
|
||||||
|
SONGS(R.id.action_song, R.string.songs, R.drawable.toggle_audiotrack),
|
||||||
|
ALBUMS(R.id.action_album, R.string.albums, R.drawable.toggle_album),
|
||||||
|
ARTISTS(R.id.action_artist, R.string.artists, R.drawable.toggle_artist),
|
||||||
|
PLAYLISTS(R.id.action_playlist, R.string.playlists, R.drawable.toggle_queue_music),
|
||||||
|
GENRES(R.id.action_genre, R.string.genres, R.drawable.toggle_guitar);
|
||||||
|
|
||||||
|
public final int stringRes;
|
||||||
|
public final int id;
|
||||||
|
public final int icon;
|
||||||
|
|
||||||
|
Category(int id, int stringRes, int icon) {
|
||||||
|
this.stringRes = stringRes;
|
||||||
|
this.id = id;
|
||||||
|
this.icon = icon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -42,7 +42,6 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home
|
||||||
loadTopArtists()
|
loadTopArtists()
|
||||||
loadATopAlbums()
|
loadATopAlbums()
|
||||||
loadFavorite()
|
loadFavorite()
|
||||||
if (PreferenceUtil.getInstance().isGenreShown) loadGenre()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun subscribe() {
|
override fun subscribe() {
|
||||||
|
@ -102,14 +101,4 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home
|
||||||
view.showEmptyView()
|
view.showEmptyView()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun loadGenre() {
|
|
||||||
disposable += repository.allGenres
|
|
||||||
.subscribe({
|
|
||||||
if (it.isNotEmpty()) hashSet.add(Home(6, R.string.genres, 0, it, GENRES, R.drawable.ic_guitar_acoustic_white_24dp))
|
|
||||||
view.showData(ArrayList(hashSet))
|
|
||||||
}, {
|
|
||||||
view.showEmptyView()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ package code.name.monkey.retromusic.preferences
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.graphics.PorterDuff
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
@ -24,21 +25,21 @@ import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.preference.DialogPreference
|
|
||||||
import androidx.preference.PreferenceDialogFragmentCompat
|
import androidx.preference.PreferenceDialogFragmentCompat
|
||||||
import androidx.viewpager.widget.PagerAdapter
|
import androidx.viewpager.widget.PagerAdapter
|
||||||
import androidx.viewpager.widget.ViewPager
|
import androidx.viewpager.widget.ViewPager
|
||||||
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
|
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.fragments.AlbumCoverStyle
|
import code.name.monkey.retromusic.fragments.AlbumCoverStyle
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import code.name.monkey.retromusic.util.ViewUtil
|
import code.name.monkey.retromusic.util.ViewUtil
|
||||||
import com.afollestad.materialdialogs.MaterialDialog
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
|
||||||
import com.afollestad.materialdialogs.customview.customView
|
import com.afollestad.materialdialogs.customview.customView
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
|
|
||||||
|
|
||||||
class AlbumCoverStylePreference : DialogPreference {
|
class AlbumCoverStylePreference : ATEDialogPreference {
|
||||||
constructor(context: Context) : super(context)
|
constructor(context: Context) : super(context)
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
|
constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
|
||||||
|
@ -52,6 +53,10 @@ class AlbumCoverStylePreference : DialogPreference {
|
||||||
override fun getDialogLayoutResource(): Int {
|
override fun getDialogLayoutResource(): Int {
|
||||||
return mLayoutRes;
|
return mLayoutRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
init {
|
||||||
|
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AlbumCoverStylePreferenceDialog : PreferenceDialogFragmentCompat(), ViewPager.OnPageChangeListener {
|
class AlbumCoverStylePreferenceDialog : PreferenceDialogFragmentCompat(), ViewPager.OnPageChangeListener {
|
||||||
|
@ -131,13 +136,11 @@ class AlbumCoverStylePreferenceDialog : PreferenceDialogFragmentCompat(), ViewPa
|
||||||
companion object {
|
companion object {
|
||||||
val TAG: String = AlbumCoverStylePreferenceDialog::class.java.simpleName
|
val TAG: String = AlbumCoverStylePreferenceDialog::class.java.simpleName
|
||||||
|
|
||||||
private const val EXTRA_KEY = "key"
|
|
||||||
|
|
||||||
fun newInstance(key: String): AlbumCoverStylePreferenceDialog {
|
fun newInstance(key: String): AlbumCoverStylePreferenceDialog {
|
||||||
val args = Bundle()
|
val bundle = Bundle()
|
||||||
args.putString(EXTRA_KEY, key)
|
bundle.putString(ARG_KEY, key)
|
||||||
val fragment = AlbumCoverStylePreferenceDialog()
|
val fragment = AlbumCoverStylePreferenceDialog()
|
||||||
fragment.arguments = args
|
fragment.arguments = bundle
|
||||||
return fragment
|
return fragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,8 @@ import android.os.Bundle
|
||||||
import android.text.Html
|
import android.text.Html
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import androidx.preference.DialogPreference
|
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
|
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.dialogs.BlacklistFolderChooserDialog
|
import code.name.monkey.retromusic.dialogs.BlacklistFolderChooserDialog
|
||||||
import code.name.monkey.retromusic.providers.BlacklistStore
|
import code.name.monkey.retromusic.providers.BlacklistStore
|
||||||
|
@ -32,7 +32,7 @@ import com.afollestad.materialdialogs.list.listItems
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class BlacklistPreference : DialogPreference {
|
class BlacklistPreference : ATEDialogPreference {
|
||||||
constructor(context: Context) : super(context)
|
constructor(context: Context) : super(context)
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
|
constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
|
||||||
|
@ -48,14 +48,8 @@ class BlacklistPreference : DialogPreference {
|
||||||
|
|
||||||
class BlacklistPreferenceDialog : DialogFragment(), BlacklistFolderChooserDialog.FolderCallback {
|
class BlacklistPreferenceDialog : DialogFragment(), BlacklistFolderChooserDialog.FolderCallback {
|
||||||
companion object {
|
companion object {
|
||||||
private const val EXTRA_KEY = "key"
|
fun newInstance(): BlacklistPreferenceDialog {
|
||||||
|
return BlacklistPreferenceDialog()
|
||||||
fun newInstance(key: String): BlacklistPreferenceDialog {
|
|
||||||
val args = Bundle()
|
|
||||||
args.putString(EXTRA_KEY, key)
|
|
||||||
val fragment = BlacklistPreferenceDialog()
|
|
||||||
fragment.arguments = args
|
|
||||||
return fragment
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,126 @@
|
||||||
|
/*
|
||||||
|
* 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.preferences
|
||||||
|
|
||||||
|
import android.app.Dialog
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.PorterDuff
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.preference.PreferenceDialogFragmentCompat
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
|
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
|
||||||
|
import code.name.monkey.retromusic.adapter.CategoryInfoAdapter
|
||||||
|
import code.name.monkey.retromusic.model.CategoryInfo
|
||||||
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
|
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||||
|
import com.afollestad.materialdialogs.customview.customView
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
|
||||||
|
class LibraryPreference : ATEDialogPreference {
|
||||||
|
constructor(context: Context) : super(context) {}
|
||||||
|
|
||||||
|
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {}
|
||||||
|
|
||||||
|
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {}
|
||||||
|
|
||||||
|
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {}
|
||||||
|
|
||||||
|
init {
|
||||||
|
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LibraryPreferenceDialog : PreferenceDialogFragmentCompat() {
|
||||||
|
|
||||||
|
override fun onDialogClosed(positiveResult: Boolean) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
lateinit var adapter: CategoryInfoAdapter
|
||||||
|
|
||||||
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
|
val view = activity!!.layoutInflater.inflate(code.name.monkey.retromusic.R.layout.preference_dialog_library_categories, null)
|
||||||
|
|
||||||
|
val categoryInfos: List<CategoryInfo>
|
||||||
|
if (savedInstanceState != null) {
|
||||||
|
categoryInfos = savedInstanceState.getParcelableArrayList(PreferenceUtil.LIBRARY_CATEGORIES)
|
||||||
|
} else {
|
||||||
|
categoryInfos = PreferenceUtil.getInstance().getLibraryCategoryInfos()
|
||||||
|
}
|
||||||
|
adapter = CategoryInfoAdapter(categoryInfos)
|
||||||
|
|
||||||
|
val recyclerView = view.findViewById<RecyclerView>(code.name.monkey.retromusic.R.id.recycler_view)
|
||||||
|
recyclerView.layoutManager = LinearLayoutManager(activity)
|
||||||
|
recyclerView.adapter = adapter
|
||||||
|
|
||||||
|
adapter.attachToRecyclerView(recyclerView)
|
||||||
|
|
||||||
|
|
||||||
|
return MaterialDialog(context!!, BottomSheet())
|
||||||
|
.title(code.name.monkey.retromusic.R.string.library_categories)
|
||||||
|
.customView(view = view)
|
||||||
|
.positiveButton(android.R.string.ok) {
|
||||||
|
updateCategories(adapter.categoryInfos)
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
.negativeButton(android.R.string.cancel) {
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
.neutralButton(code.name.monkey.retromusic.R.string.reset_action) {
|
||||||
|
adapter.categoryInfos = PreferenceUtil.getInstance().defaultLibraryCategoryInfos
|
||||||
|
}
|
||||||
|
.noAutoDismiss()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onSaveInstanceState(outState: Bundle) {
|
||||||
|
super.onSaveInstanceState(outState)
|
||||||
|
outState.putParcelableArrayList(PreferenceUtil.LIBRARY_CATEGORIES, ArrayList(adapter.categoryInfos))
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun updateCategories(categories: List<CategoryInfo>) {
|
||||||
|
if (getSelected(categories) == 0) return
|
||||||
|
if (getSelected(categories) > 5) {
|
||||||
|
Toast.makeText(context, "Not more than 5 items", Toast.LENGTH_SHORT).show()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
PreferenceUtil.getInstance().libraryCategoryInfos = categories
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getSelected(categories: List<CategoryInfo>): Int {
|
||||||
|
var selected = 0
|
||||||
|
for (categoryInfo in categories) {
|
||||||
|
if (categoryInfo.visible)
|
||||||
|
selected++
|
||||||
|
}
|
||||||
|
return selected
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
|
||||||
|
fun newInstance(key: String): LibraryPreferenceDialog {
|
||||||
|
val bundle = Bundle()
|
||||||
|
bundle.putString(ARG_KEY, key)
|
||||||
|
val fragment = LibraryPreferenceDialog()
|
||||||
|
fragment.arguments = bundle
|
||||||
|
return fragment
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -25,11 +25,11 @@ import android.view.ViewGroup
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.preference.DialogPreference
|
|
||||||
import androidx.preference.PreferenceDialogFragmentCompat
|
import androidx.preference.PreferenceDialogFragmentCompat
|
||||||
import androidx.viewpager.widget.PagerAdapter
|
import androidx.viewpager.widget.PagerAdapter
|
||||||
import androidx.viewpager.widget.ViewPager
|
import androidx.viewpager.widget.ViewPager
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
|
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
|
||||||
import code.name.monkey.retromusic.App
|
import code.name.monkey.retromusic.App
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.fragments.NowPlayingScreen
|
import code.name.monkey.retromusic.fragments.NowPlayingScreen
|
||||||
|
@ -40,7 +40,7 @@ import com.afollestad.materialdialogs.MaterialDialog
|
||||||
import com.afollestad.materialdialogs.customview.customView
|
import com.afollestad.materialdialogs.customview.customView
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
|
|
||||||
class NowPlayingScreenPreference : DialogPreference {
|
class NowPlayingScreenPreference : ATEDialogPreference {
|
||||||
|
|
||||||
constructor(context: Context) : super(context) {}
|
constructor(context: Context) : super(context) {}
|
||||||
|
|
||||||
|
@ -62,7 +62,9 @@ class NowPlayingScreenPreference : DialogPreference {
|
||||||
}
|
}
|
||||||
|
|
||||||
class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(), ViewPager.OnPageChangeListener {
|
class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(), ViewPager.OnPageChangeListener {
|
||||||
|
|
||||||
private var viewPagerPosition: Int = 0
|
private var viewPagerPosition: Int = 0
|
||||||
|
|
||||||
override fun onPageScrollStateChanged(state: Int) {
|
override fun onPageScrollStateChanged(state: Int) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -124,13 +126,11 @@ class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(), ViewP
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val EXTRA_KEY = "key"
|
|
||||||
|
|
||||||
fun newInstance(key: String): NowPlayingScreenPreferenceDialog {
|
fun newInstance(key: String): NowPlayingScreenPreferenceDialog {
|
||||||
val args = Bundle()
|
val bundle = Bundle()
|
||||||
args.putString(EXTRA_KEY, key)
|
bundle.putString(ARG_KEY, key)
|
||||||
val fragment = NowPlayingScreenPreferenceDialog()
|
val fragment = NowPlayingScreenPreferenceDialog()
|
||||||
fragment.arguments = args
|
fragment.arguments = bundle
|
||||||
return fragment
|
return fragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,7 @@ class CustomArtistImageUtil private constructor(context: Context) {
|
||||||
@SuppressLint("ApplySharedPref")
|
@SuppressLint("ApplySharedPref")
|
||||||
override fun doInBackground(vararg params: Void): Void? {
|
override fun doInBackground(vararg params: Void): Void? {
|
||||||
val dir = File(App.context.filesDir, FOLDER_NAME)
|
val dir = File(App.context.filesDir, FOLDER_NAME)
|
||||||
|
println(dir.absolutePath)
|
||||||
if (!dir.exists()) {
|
if (!dir.exists()) {
|
||||||
if (!dir.mkdirs()) { // create the folder
|
if (!dir.mkdirs()) { // create the folder
|
||||||
return null
|
return null
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class MusicUtil {
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public static Intent createShareSongFileIntent(@NonNull final Song song, @NonNull Context context) {
|
public static Intent createShareSongFileIntent(@NonNull final Song song, @NonNull Context context) {
|
||||||
Uri file = FileProvider.getUriForFile(context, context.getPackageName() + ".provider", new File(song.getData()));
|
/*Uri file = FileProvider.getUriForFile(context, context.getPackageName() + ".provider", new File(song.getData()));
|
||||||
try {
|
try {
|
||||||
return new Intent().setAction(Intent.ACTION_SEND).putExtra(Intent.EXTRA_STREAM, file)
|
return new Intent().setAction(Intent.ACTION_SEND).putExtra(Intent.EXTRA_STREAM, file)
|
||||||
.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||||
|
@ -82,6 +82,19 @@ public class MusicUtil {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Toast.makeText(context, "Could not share this file, I'm aware of the issue.", Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, "Could not share this file, I'm aware of the issue.", Toast.LENGTH_SHORT).show();
|
||||||
return new Intent();
|
return new Intent();
|
||||||
|
}*/
|
||||||
|
|
||||||
|
try {
|
||||||
|
return new Intent()
|
||||||
|
.setAction(Intent.ACTION_SEND)
|
||||||
|
.putExtra(Intent.EXTRA_STREAM, FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName(), new File(song.getData())))
|
||||||
|
.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||||
|
.setType("audio/*");
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
// TODO the path is most likely not like /storage/emulated/0/... but something like /storage/28C7-75B0/...
|
||||||
|
e.printStackTrace();
|
||||||
|
Toast.makeText(context, "Could not share this file, I'm aware of the issue.", Toast.LENGTH_SHORT).show();
|
||||||
|
return new Intent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,14 @@ import androidx.annotation.StyleRes;
|
||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
import com.google.android.material.bottomnavigation.LabelVisibilityMode;
|
import com.google.android.material.bottomnavigation.LabelVisibilityMode;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.JsonSyntaxException;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.App;
|
import code.name.monkey.retromusic.App;
|
||||||
|
@ -38,6 +44,7 @@ import code.name.monkey.retromusic.fragments.AlbumCoverStyle;
|
||||||
import code.name.monkey.retromusic.fragments.NowPlayingScreen;
|
import code.name.monkey.retromusic.fragments.NowPlayingScreen;
|
||||||
import code.name.monkey.retromusic.fragments.mainactivity.folders.FoldersFragment;
|
import code.name.monkey.retromusic.fragments.mainactivity.folders.FoldersFragment;
|
||||||
import code.name.monkey.retromusic.helper.SortOrder;
|
import code.name.monkey.retromusic.helper.SortOrder;
|
||||||
|
import code.name.monkey.retromusic.model.CategoryInfo;
|
||||||
import code.name.monkey.retromusic.transform.CascadingPageTransformer;
|
import code.name.monkey.retromusic.transform.CascadingPageTransformer;
|
||||||
import code.name.monkey.retromusic.transform.DepthTransformation;
|
import code.name.monkey.retromusic.transform.DepthTransformation;
|
||||||
import code.name.monkey.retromusic.transform.HingeTransformation;
|
import code.name.monkey.retromusic.transform.HingeTransformation;
|
||||||
|
@ -47,7 +54,7 @@ import code.name.monkey.retromusic.transform.VerticalFlipTransformation;
|
||||||
import code.name.monkey.retromusic.transform.VerticalStackTransformer;
|
import code.name.monkey.retromusic.transform.VerticalStackTransformer;
|
||||||
|
|
||||||
public final class PreferenceUtil {
|
public final class PreferenceUtil {
|
||||||
|
public static final String LIBRARY_CATEGORIES = "library_categories";
|
||||||
public static final String KEEP_SCREEN_ON = "keep_screen_on";
|
public static final String KEEP_SCREEN_ON = "keep_screen_on";
|
||||||
public static final String TOGGLE_HOME_BANNER = "toggle_home_banner";
|
public static final String TOGGLE_HOME_BANNER = "toggle_home_banner";
|
||||||
public static final String NOW_PLAYING_SCREEN_ID = "now_playing_screen_id";
|
public static final String NOW_PLAYING_SCREEN_ID = "now_playing_screen_id";
|
||||||
|
@ -812,4 +819,44 @@ public final class PreferenceUtil {
|
||||||
public boolean isClickOrSave() {
|
public boolean isClickOrSave() {
|
||||||
return mPreferences.getBoolean(NOW_PLAYING_SCREEN, false);
|
return mPreferences.getBoolean(NOW_PLAYING_SCREEN, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
public List<CategoryInfo> getLibraryCategoryInfos() {
|
||||||
|
String data = mPreferences.getString(LIBRARY_CATEGORIES, null);
|
||||||
|
if (data != null) {
|
||||||
|
Gson gson = new Gson();
|
||||||
|
Type collectionType = new TypeToken<List<CategoryInfo>>() {
|
||||||
|
}.getType();
|
||||||
|
|
||||||
|
try {
|
||||||
|
return gson.fromJson(data, collectionType);
|
||||||
|
} catch (JsonSyntaxException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return getDefaultLibraryCategoryInfos();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLibraryCategoryInfos(List<CategoryInfo> categories) {
|
||||||
|
Gson gson = new Gson();
|
||||||
|
Type collectionType = new TypeToken<List<CategoryInfo>>() {
|
||||||
|
}.getType();
|
||||||
|
|
||||||
|
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||||
|
editor.putString(LIBRARY_CATEGORIES, gson.toJson(categories, collectionType));
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
public List<CategoryInfo> getDefaultLibraryCategoryInfos() {
|
||||||
|
List<CategoryInfo> defaultCategoryInfos = new ArrayList<>(6);
|
||||||
|
defaultCategoryInfos.add(new CategoryInfo(CategoryInfo.Category.HOME, true));
|
||||||
|
defaultCategoryInfos.add(new CategoryInfo(CategoryInfo.Category.SONGS, true));
|
||||||
|
defaultCategoryInfos.add(new CategoryInfo(CategoryInfo.Category.ALBUMS, true));
|
||||||
|
defaultCategoryInfos.add(new CategoryInfo(CategoryInfo.Category.ARTISTS, true));
|
||||||
|
defaultCategoryInfos.add(new CategoryInfo(CategoryInfo.Category.PLAYLISTS, true));
|
||||||
|
defaultCategoryInfos.add(new CategoryInfo(CategoryInfo.Category.GENRES, false));
|
||||||
|
return defaultCategoryInfos;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,6 +195,13 @@ public class RetroColorUtil {
|
||||||
return backgroundColor;
|
return backgroundColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ColorInt
|
||||||
|
public static int shiftBackgroundColorForDarkText(@ColorInt int backgroundColor) {
|
||||||
|
while (!ColorUtil.INSTANCE.isColorLight(backgroundColor)) {
|
||||||
|
backgroundColor = ColorUtil.INSTANCE.lightenColor(backgroundColor);
|
||||||
|
}
|
||||||
|
return backgroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
private static class SwatchComparator implements Comparator<Palette.Swatch> {
|
private static class SwatchComparator implements Comparator<Palette.Swatch> {
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
/*
|
||||||
|
* 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.util;
|
||||||
|
|
||||||
|
import android.graphics.Canvas;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||||
|
|
||||||
|
public class SwipeAndDragHelper extends ItemTouchHelper.Callback {
|
||||||
|
|
||||||
|
private ActionCompletionContract contract;
|
||||||
|
|
||||||
|
public SwipeAndDragHelper(ActionCompletionContract contract) {
|
||||||
|
this.contract = contract;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
|
||||||
|
int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN;
|
||||||
|
return makeMovementFlags(dragFlags, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
|
||||||
|
contract.onViewMoved(viewHolder.getAdapterPosition(), target.getAdapterPosition());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isLongPressDragEnabled() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onChildDraw(Canvas c,
|
||||||
|
RecyclerView recyclerView,
|
||||||
|
RecyclerView.ViewHolder viewHolder,
|
||||||
|
float dX,
|
||||||
|
float dY,
|
||||||
|
int actionState,
|
||||||
|
boolean isCurrentlyActive) {
|
||||||
|
if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) {
|
||||||
|
float alpha = 1 - (Math.abs(dX) / recyclerView.getWidth());
|
||||||
|
viewHolder.itemView.setAlpha(alpha);
|
||||||
|
}
|
||||||
|
super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ActionCompletionContract {
|
||||||
|
void onViewMoved(int oldPosition, int newPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -53,20 +53,7 @@ object ViewUtil {
|
||||||
if (thumbTint) {
|
if (thumbTint) {
|
||||||
progressSlider.thumbTintList = ColorStateList.valueOf(newColor)
|
progressSlider.thumbTintList = ColorStateList.valueOf(newColor)
|
||||||
}
|
}
|
||||||
|
progressSlider.progressTintList = ColorStateList.valueOf(newColor)
|
||||||
if (progressSlider.progressDrawable is LayerDrawable) {
|
|
||||||
val ld = progressSlider.progressDrawable as LayerDrawable?
|
|
||||||
|
|
||||||
if (ld != null) {
|
|
||||||
val clipDrawableProgress = ld.findDrawableByLayerId(android.R.id.progress)
|
|
||||||
clipDrawableProgress.setColorFilter(newColor, PorterDuff.Mode.SRC_IN)
|
|
||||||
|
|
||||||
val clipDrawableBackground = ld.findDrawableByLayerId(android.R.id.background)
|
|
||||||
clipDrawableBackground.setColorFilter(MaterialValueHelper.getPrimaryDisabledTextColor(progressSlider.context, ColorUtil.isColorLight(ThemeStore.primaryColor(progressSlider.context))), PorterDuff.Mode.SRC_IN)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
progressSlider.progressTintList = ColorStateList.valueOf(newColor)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setProgressDrawable(progressSlider: ProgressBar, newColor: Int) {
|
fun setProgressDrawable(progressSlider: ProgressBar, newColor: Int) {
|
||||||
|
|
|
@ -1,16 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2008 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<item android:id="@android:id/background">
|
<item android:id="@android:id/background">
|
||||||
<shape>
|
<shape>
|
||||||
<corners android:radius="8dp" />
|
<corners android:radius="8dip" />
|
||||||
<solid android:color="?android:colorButtonNormal" />
|
<solid android:color="?android:colorButtonNormal" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
|
<item android:id="@android:id/secondaryProgress">
|
||||||
|
<clip>
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="8dip" />
|
||||||
|
<solid android:color="?android:colorButtonNormal" />
|
||||||
|
</shape>
|
||||||
|
</clip>
|
||||||
|
</item>
|
||||||
|
|
||||||
<item android:id="@android:id/progress">
|
<item android:id="@android:id/progress">
|
||||||
<clip>
|
<clip>
|
||||||
<shape>
|
<shape>
|
||||||
<corners android:radius="8dp" />
|
<corners android:radius="8dip" />
|
||||||
<solid android:color="@color/md_black_1000" />
|
<solid android:color="@color/md_black_1000" />
|
||||||
</shape>
|
</shape>
|
||||||
</clip>
|
</clip>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
|
||||||
|
</layer-list>
|
||||||
|
<!--<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:id="@android:id/background">
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<solid android:color="?android:colorButtonNormal" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:id="@android:id/progress">
|
||||||
|
<clip>
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<solid android:color="@color/md_black_1000" />
|
||||||
|
</shape>
|
||||||
|
</clip>
|
||||||
|
</item>
|
||||||
|
</layer-list>-->
|
||||||
|
|
|
@ -1,10 +1,17 @@
|
||||||
<!-- drawable/guitar_acoustic.xml -->
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="511.999"
|
||||||
android:viewportHeight="24">
|
android:viewportHeight="511.999">
|
||||||
|
|
||||||
<path
|
<path
|
||||||
android:fillColor="@color/md_white_1000"
|
android:fillColor="@color/md_white_1000"
|
||||||
android:pathData="M19.59,3H22V5H20.41L16.17,9.24C15.8,8.68 15.32,8.2 14.76,7.83L19.59,3M12,8A4,4 0 0,1 16,12C16,13.82 14.77,15.42 13,15.87V16A5,5 0 0,1 8,21A5,5 0 0,1 3,16A5,5 0 0,1 8,11H8.13C8.58,9.24 10.17,8 12,8M12,10.5A1.5,1.5 0 0,0 10.5,12A1.5,1.5 0 0,0 12,13.5A1.5,1.5 0 0,0 13.5,12A1.5,1.5 0 0,0 12,10.5M6.94,14.24L6.23,14.94L9.06,17.77L9.77,17.06L6.94,14.24Z" />
|
android:pathData="M276.503 421.573c5.687-26.889 21.401-49.915 44.245-64.834 19.137-12.495 30.74-29.04 33.555-47.846 3.149-21.04-4.592-44.418-23.022-69.629l64.952-64.949-58.682-58.682-65.311 65.315c-24.124-16.967-46.712-24.068-67.286-21.117-18.947 2.72-35.843 14.104-48.864 32.926-15.481 22.39-38.441 37.471-64.657 42.467-25.764 4.921-43.684 12.515-54.784 23.212-23.097 22.258-36.062 54.037-36.506 89.484-0.53 42.25 16.932 85.486 46.71 115.656 29.794 30.185 72.705 48.286 114.787 48.421 0.162 0.001 0.318 0 0.48 0 35.187-0.001 67.001-12.443 89.616-35.062 11.137-11.137 19.239-29.245 24.767-55.362zm-127.857 1.924c-3.839 0-7.678-1.464-10.607-4.393l-45.276-45.276c-5.858-5.858-5.858-15.355 0-21.213 5.857-5.858 15.355-5.858 21.213 0l45.276 45.276c5.858 5.858 5.858 15.355 0 21.213-2.929 2.929-6.768 4.393-10.606 4.393zm64.261-74.466c-12.827 0-25.653-4.88-35.422-14.641-19.529-19.544-19.527-51.322-0.004-70.847 8.539-8.539 19.875-13.705 31.921-14.547 14.474-1.02 28.658 4.281 38.923 14.547 10.266 10.265 15.567 24.455 14.546 38.932-0.834 12.032-5.999 23.364-14.547 31.911-9.762 9.763-22.59 14.645-35.417 14.645z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/md_white_1000"
|
||||||
|
android:pathData="M359.067 40.306c-5.858 5.858-5.858 15.355 0 21.213l15.16 15.16-15.485 17.719 58.728 58.728 17.719-15.485 15.159 15.159c2.929 2.929 6.768 4.394 10.607 4.393 3.839 0 7.678-1.464 10.606-4.393 5.858-5.858 5.858-15.355 0-21.213l-13.732-13.732 11.057-9.663 13.036 13.036c2.929 2.929 6.768 4.394 10.607 4.393 3.839 0 7.678-1.464 10.606-4.393 5.858-5.858 5.858-15.355 0-21.213l-11.609-11.609 15.213-13.295c3.127-2.733 4.981-6.64 5.121-10.79 0.139 -4.151-1.448-8.174-4.385-11.11l-48.818-48.818c-2.936-2.937-6.943-4.52-11.11-4.385-4.15 0.14 -8.057 1.994-10.79 5.121l-13.295 15.213-11.609-11.609c-5.858-5.858-15.356-5.858-21.213 0-5.858 5.858-5.858 15.355 0 21.213l13.036 13.036-9.663 11.057-13.733-13.733c-5.858-5.859-15.356-5.859-21.213 0z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/md_white_1000"
|
||||||
|
android:pathData="M232.945 300.364c0.332-4.714-1.009-9.354-3.732-13.136-0.628-0.873-1.33-1.7-2.102-2.472-3.781-3.782-8.89-5.884-14.193-5.884-0.47 0-0.941 0.017 -1.414 0.05 -4.84 0.338 -9.386 2.41-12.81 5.833-7.831 7.832-7.829 20.582 0.004 28.421 7.832 7.826 20.581 7.828 28.413-0.004 3.431-3.43 5.502-7.969 5.832-12.782 0.001 -0.008 0.002 -0.017 0.002 -0.026z" />
|
||||||
</vector>
|
</vector>
|
14
app/src/main/res/drawable/ic_guitar_white_24dp.xml
Normal file
14
app/src/main/res/drawable/ic_guitar_white_24dp.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="512"
|
||||||
|
android:viewportHeight="512">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/md_white_1000"
|
||||||
|
android:pathData="M511.861 64.321c0.139-4.151-1.448-8.174-4.385-11.11l-48.817-48.818c-2.936-2.937-6.943-4.521-11.11-4.385-4.15 0.14 -8.058 1.994-10.791 5.121l-13.295 15.213-11.608-11.609c-5.857-5.858-15.355-5.858-21.213 0s-5.858 15.355 0 21.213l13.036 13.036-9.663 11.057-13.733-13.733c-5.857-5.858-15.355-5.858-21.213 0s-5.858 15.355 0 21.213l15.16 15.16-102.024 104.305c-22.898-16.082-44.302-23.315-63.925-21.541-20.337 1.838-38.384 13.358-52.188 33.316-15.486 22.389-38.447 37.472-64.653 42.47-25.751 4.912-43.671 12.503-54.782 23.208-23.1 22.254-36.067 54.03-36.514 89.476-0.533 42.25 16.928 85.488 46.708 115.66 29.792 30.185 72.7 48.289 114.779 48.426 0.165 0 0.327 0.001 0.49 0.001 35.188 0 66.999-12.441 89.618-35.06 11.143-11.143 19.245-29.252 24.77-55.363 5.69-26.892 21.404-49.917 44.248-64.835 20.106-13.129 31.83-30.629 33.904-50.607 2.139-20.603-5.537-42.685-23.346-66.899l103.876-101.595 15.16 15.159c2.929 2.929 6.768 4.394 10.606 4.394s7.678-1.464 10.606-4.394c5.858-5.858 5.858-15.355 0-21.213l-13.732-13.732 11.057-9.663 13.036 13.036c2.929 2.929 6.768 4.394 10.606 4.394s7.678-1.464 10.606-4.394c5.858-5.858 5.858-15.355 0-21.213l-11.609-11.609 15.213-13.295c3.128-2.733 4.982-6.64 5.122-10.79zm-187.042 238.716c-1.125 10.834-8.011 20.452-20.468 28.587-29.538 19.289-49.85 49.029-57.195 83.743-5.54 26.185-12.798 36.526-16.632 40.359-17.032 17.032-41.486 26.318-68.797 26.273-34.262-0.113-69.225-14.879-93.526-39.5-24.267-24.587-38.495-59.805-38.062-94.209 0.345 -27.364 10.051-51.602 27.331-68.249 3.767-3.629 13.918-10.448 39.588-15.344 33.986-6.481 63.713-25.969 83.705-54.872 8.701-12.58 18.868-19.479 30.216-20.504 1.046-0.094 2.111-0.142 3.193-0.142 10.609 0 22.904 4.54 36.463 13.373l-47.245 47.245c-9.497 1.824-18.565 6.404-25.904 13.742-19.531 19.531-19.531 51.311 0 70.841 9.766 9.766 22.593 14.648 35.421 14.648s25.655-4.883 35.421-14.648c7.338-7.339 11.918-16.406 13.742-25.904l47.701-47.701c11.128 16.162 16.272 30.472 15.048 42.262zm-97.704-18.283c7.834 7.834 7.834 20.582 0 28.416-7.835 7.834-20.581 7.834-28.416 0-7.834-7.834-7.834-20.581 0-28.416 3.918-3.917 9.062-5.875 14.208-5.875 5.145-0.001 10.291 1.958 14.208 5.875zm28.388-12.135c-1.996-3.227-4.378-6.282-7.175-9.078-2.797-2.797-5.851-5.179-9.079-7.175l130.124-130.124 16.254 16.254zm152.027-150.647-17.633-17.633 58.893-67.389 26.129 26.129z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/md_white_1000"
|
||||||
|
android:pathData="M113.978 352.615c-5.857-5.858-15.355-5.858-21.213 0s-5.858 15.355 0 21.213l45.276 45.276c2.929 2.929 6.768 4.394 10.606 4.394s7.678-1.464 10.606-4.394c5.858-5.858 5.858-15.355 0-21.213z" />
|
||||||
|
</vector>
|
|
@ -5,7 +5,6 @@
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24">
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
|
||||||
<path
|
<path
|
||||||
android:fillColor="@color/md_white_1000"
|
android:fillColor="@color/md_white_1000"
|
||||||
android:pathData="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-2-3.5l6-4.5-6-4.5z" />
|
android:pathData="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-2-3.5l6-4.5-6-4.5z" />
|
||||||
|
|
|
@ -1,4 +1,17 @@
|
||||||
<?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
|
||||||
|
~
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:drawable="@drawable/ic_album_selected_white_24dp" android:state_checked="true" />
|
<item android:drawable="@drawable/ic_album_selected_white_24dp" android:state_checked="true" />
|
||||||
<item android:drawable="@drawable/ic_album_white_24dp" />
|
<item android:drawable="@drawable/ic_album_white_24dp" />
|
||||||
|
|
|
@ -1,4 +1,18 @@
|
||||||
<?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
|
||||||
|
~
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:drawable="@drawable/ic_artist_selected_white_24dp" android:state_checked="true" />
|
<item android:drawable="@drawable/ic_artist_selected_white_24dp" android:state_checked="true" />
|
||||||
<item android:drawable="@drawable/ic_artist_white_24dp" />
|
<item android:drawable="@drawable/ic_artist_white_24dp" />
|
||||||
|
|
|
@ -1,4 +1,18 @@
|
||||||
<?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
|
||||||
|
~
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:drawable="@drawable/ic_audiotrack_selected_black_24dp" android:state_checked="true" />
|
<item android:drawable="@drawable/ic_audiotrack_selected_black_24dp" android:state_checked="true" />
|
||||||
<item android:drawable="@drawable/ic_audiotrack_black_24dp" />
|
<item android:drawable="@drawable/ic_audiotrack_black_24dp" />
|
||||||
|
|
17
app/src/main/res/drawable/toggle_guitar.xml
Normal file
17
app/src/main/res/drawable/toggle_guitar.xml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@drawable/ic_guitar_acoustic_white_24dp" android:state_checked="true" />
|
||||||
|
<item android:drawable="@drawable/ic_guitar_white_24dp" />
|
||||||
|
</selector>
|
|
@ -1,4 +1,18 @@
|
||||||
<?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
|
||||||
|
~
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:drawable="@drawable/ic_home_selected_white_24dp" android:state_checked="true" />
|
<item android:drawable="@drawable/ic_home_selected_white_24dp" android:state_checked="true" />
|
||||||
<item android:drawable="@drawable/ic_home_white_24dp" />
|
<item android:drawable="@drawable/ic_home_white_24dp" />
|
||||||
|
|
|
@ -1,4 +1,18 @@
|
||||||
<?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
|
||||||
|
~
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:drawable="@drawable/ic_queue_music_selected_white_24dp" android:state_checked="true" />
|
<item android:drawable="@drawable/ic_queue_music_selected_white_24dp" android:state_checked="true" />
|
||||||
<item android:drawable="@drawable/ic_queue_music_white_24dp" />
|
<item android:drawable="@drawable/ic_queue_music_white_24dp" />
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
android:name="code.name.monkey.retromusic.fragments.player.blur.BlurPlaybackControlsFragment"
|
android:name="code.name.monkey.retromusic.fragments.player.blur.BlurPlaybackControlsFragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:layout="@layout/fragment_blur_playback_controls" />
|
tools:layout="@layout/fragment_player_playback_controls" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
|
|
@ -85,7 +85,6 @@
|
||||||
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="3dp"
|
android:layout_height="3dp"
|
||||||
android:progress="20"
|
android:progress="20" />
|
||||||
android:progressDrawable="@drawable/color_progress_seek" />
|
|
||||||
|
|
||||||
</code.name.monkey.retromusic.views.FitSystemWindowsLayout>
|
</code.name.monkey.retromusic.views.FitSystemWindowsLayout>
|
|
@ -47,15 +47,16 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<SeekBar
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
android:id="@+id/progressSlider"
|
android:id="@+id/progressSlider"
|
||||||
android:layout_centerVertical="true"
|
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:progressDrawable="@drawable/color_progress_seek"
|
||||||
android:layout_toLeftOf="@id/songTotalTime"
|
android:layout_toLeftOf="@id/songTotalTime"
|
||||||
android:layout_toRightOf="@id/songCurrentProgress"
|
android:layout_toRightOf="@id/songCurrentProgress"
|
||||||
android:maxHeight="3dp"
|
android:maxHeight="2dp"
|
||||||
android:progressDrawable="@drawable/color_progress_seek"
|
|
||||||
android:splitTrack="false"
|
android:splitTrack="false"
|
||||||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||||
tools:progress="20" />
|
tools:progress="20" />
|
||||||
|
@ -73,7 +74,7 @@
|
||||||
android:paddingEnd="4dp"
|
android:paddingEnd="4dp"
|
||||||
tools:ignore="ContentDescription,UnusedAttribute">
|
tools:ignore="ContentDescription,UnusedAttribute">
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/previousButton"
|
android:id="@+id/previousButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -87,7 +88,7 @@
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:tint="@color/md_black_1000" />
|
tools:tint="@color/md_black_1000" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/nextButton"
|
android:id="@+id/nextButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -101,7 +102,7 @@
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:tint="@color/md_black_1000" />
|
tools:tint="@color/md_black_1000" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/repeatButton"
|
android:id="@+id/repeatButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -114,7 +115,7 @@
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:tint="@color/md_black_1000" />
|
tools:tint="@color/md_black_1000" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/shuffleButton"
|
android:id="@+id/shuffleButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -133,7 +134,7 @@
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:layout_centerInParent="true" />
|
android:layout_centerInParent="true" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/playPauseButton"
|
android:id="@+id/playPauseButton"
|
||||||
android:layout_width="52dp"
|
android:layout_width="52dp"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
|
@ -145,14 +146,6 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<include layout="@layout/volume_controls" />
|
||||||
android:id="@+id/volumeFragmentContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:paddingStart="8dp"
|
|
||||||
android:paddingEnd="8dp">
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -1,192 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:id="@+id/playback_controls"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="vertical"
|
|
||||||
tools:ignore="MissingPrefix">
|
|
||||||
|
|
||||||
<SeekBar
|
|
||||||
android:id="@+id/player_progress_slider"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:maxHeight="3dp"
|
|
||||||
android:paddingStart="24dp"
|
|
||||||
android:paddingEnd="24dp"
|
|
||||||
android:progressDrawable="@drawable/color_progress_seek"
|
|
||||||
tools:progress="20" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="16dp"
|
|
||||||
android:paddingEnd="16dp">
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/player_song_current_progress"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:paddingStart="8dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
tools:text="22.00" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/player_song_total_time"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:paddingStart="8dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
tools:text="22.00" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="8dp">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/title"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:ellipsize="marquee"
|
|
||||||
android:focusable="true"
|
|
||||||
android:focusableInTouchMode="true"
|
|
||||||
android:freezesText="true"
|
|
||||||
android:gravity="center"
|
|
||||||
android:marqueeRepeatLimit="marquee_forever"
|
|
||||||
android:paddingStart="16dp"
|
|
||||||
android:paddingEnd="16dp"
|
|
||||||
android:scrollHorizontally="true"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
tools:text="Title" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/text"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="center"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingStart="16dp"
|
|
||||||
android:paddingEnd="16dp"
|
|
||||||
android:textColor="@color/md_white_1000" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/player_media_controller_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
tools:ignore="ContentDescription,UnusedAttribute">
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/player_prev_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_toStartOf="@+id/dummy_fab"
|
|
||||||
android:background="?attr/roundSelector"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
app:srcCompat="@drawable/ic_skip_previous_white_24dp"
|
|
||||||
tools:ignore="MissingPrefix"
|
|
||||||
tools:tint="@color/md_black_1000" />
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/player_next_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_toEndOf="@+id/dummy_fab"
|
|
||||||
android:background="?attr/roundSelector"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
app:srcCompat="@drawable/ic_skip_next_white_24dp"
|
|
||||||
tools:ignore="MissingPrefix"
|
|
||||||
tools:tint="@color/md_black_1000" />
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/player_repeat_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:background="?attr/roundSelector"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
app:srcCompat="@drawable/ic_repeat_white_24dp"
|
|
||||||
tools:ignore="MissingPrefix"
|
|
||||||
tools:tint="@color/md_black_1000" />
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/player_shuffle_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:background="?attr/roundSelector"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
app:srcCompat="@drawable/ic_shuffle_white_24dp"
|
|
||||||
tools:ignore="MissingPrefix"
|
|
||||||
tools:tint="@color/md_black_1000" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:id="@+id/dummy_fab"
|
|
||||||
android:layout_width="56dp"
|
|
||||||
android:layout_height="56dp"
|
|
||||||
android:layout_centerInParent="true" />
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/player_play_pause_button"
|
|
||||||
android:layout_width="52dp"
|
|
||||||
android:layout_height="52dp"
|
|
||||||
android:layout_above="@id/title_container"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:background="@drawable/color_circle_gradient"
|
|
||||||
android:elevation="4dp"
|
|
||||||
android:padding="16dp"
|
|
||||||
app:srcCompat="@drawable/ic_play_arrow_white_32dp" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/volume_fragment_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="0">
|
|
||||||
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/volume_fragment"
|
|
||||||
android:name="code.name.monkey.retromusic.fragments.VolumeFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
tools:layout="@layout/fragment_volume" />
|
|
||||||
</FrameLayout>
|
|
||||||
</LinearLayout>
|
|
|
@ -20,7 +20,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
tools:text="@string/pref_title_user_info" />
|
tools:text="@string/pref_title_user_info" />
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/text"
|
android:id="@+id/text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -56,9 +56,10 @@
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatSeekBar
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
android:id="@+id/progressSlider"
|
android:id="@+id/progressSlider"
|
||||||
|
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxHeight="3dp"
|
android:maxHeight="2dp"
|
||||||
android:paddingStart="20dp"
|
android:paddingStart="20dp"
|
||||||
android:paddingEnd="20dp"
|
android:paddingEnd="20dp"
|
||||||
android:progressDrawable="@drawable/color_progress_seek"
|
android:progressDrawable="@drawable/color_progress_seek"
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<SeekBar
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
android:id="@+id/progressSlider"
|
android:id="@+id/progressSlider"
|
||||||
style="@style/MusicProgressSlider"
|
style="@style/MusicProgressSlider"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<SeekBar
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
android:id="@+id/playerProgressSlider"
|
android:id="@+id/playerProgressSlider"
|
||||||
style="@style/MusicProgressSlider"
|
style="@style/MusicProgressSlider"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp">
|
android:paddingEnd="12dp">
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/songCurrentProgress"
|
android:id="@+id/songCurrentProgress"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/songTotalTime"
|
android:id="@+id/songTotalTime"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -45,11 +45,14 @@
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatSeekBar
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
android:id="@+id/progressSlider"
|
android:id="@+id/progressSlider"
|
||||||
|
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toLeftOf="@id/songTotalTime"
|
android:layout_toLeftOf="@id/songTotalTime"
|
||||||
android:layout_toRightOf="@id/songCurrentProgress"
|
android:layout_toRightOf="@id/songCurrentProgress"
|
||||||
|
android:progressDrawable="@drawable/color_progress_seek"
|
||||||
|
android:maxHeight="2dp"
|
||||||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||||
tools:progress="20" />
|
tools:progress="20" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<SeekBar
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
android:id="@+id/progressSlider"
|
android:id="@+id/progressSlider"
|
||||||
style="@style/MusicProgressSlider"
|
style="@style/MusicProgressSlider"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp">
|
android:paddingEnd="12dp">
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/songCurrentProgress"
|
android:id="@+id/songCurrentProgress"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/songTotalTime"
|
android:id="@+id/songTotalTime"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -44,15 +44,13 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<SeekBar
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
android:id="@+id/progressSlider"
|
android:id="@+id/progressSlider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toLeftOf="@id/songTotalTime"
|
android:layout_toLeftOf="@id/songTotalTime"
|
||||||
android:layout_toRightOf="@id/songCurrentProgress"
|
android:layout_toRightOf="@id/songCurrentProgress"
|
||||||
android:maxHeight="3dp"
|
|
||||||
android:progressDrawable="@drawable/color_progress_seek"
|
|
||||||
android:splitTrack="false"
|
android:splitTrack="false"
|
||||||
android:thumb="@drawable/switch_square"
|
android:thumb="@drawable/switch_square"
|
||||||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:srcCompat="@drawable/ic_more_vert_white_24dp" />
|
app:srcCompat="@drawable/ic_more_vert_white_24dp" />
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
style="@style/TextAppearance.MaterialComponents.Subtitle1"
|
style="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="@string/for_you" />
|
tools:text="@string/for_you" />
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/text"
|
android:id="@+id/text"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp">
|
android:paddingEnd="12dp">
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/songCurrentProgress"
|
android:id="@+id/songCurrentProgress"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body1"
|
style="@style/TextAppearance.MaterialComponents.Body1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||||
tools:text="00:00" />
|
tools:text="00:00" />
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/songTotalTime"
|
android:id="@+id/songTotalTime"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body1"
|
style="@style/TextAppearance.MaterialComponents.Body1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -108,15 +108,16 @@
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||||
tools:text="00:00" />
|
tools:text="00:00" />
|
||||||
|
|
||||||
<SeekBar
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
android:id="@+id/progressSlider"
|
android:id="@+id/progressSlider"
|
||||||
|
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toLeftOf="@id/songTotalTime"
|
android:layout_toLeftOf="@id/songTotalTime"
|
||||||
|
android:progressDrawable="@drawable/color_progress_seek"
|
||||||
android:layout_toRightOf="@id/songCurrentProgress"
|
android:layout_toRightOf="@id/songCurrentProgress"
|
||||||
android:maxHeight="3dp"
|
android:maxHeight="3dp"
|
||||||
android:progressDrawable="@drawable/color_progress_seek"
|
|
||||||
android:splitTrack="false"
|
android:splitTrack="false"
|
||||||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||||
tools:progress="20" />
|
tools:progress="20" />
|
||||||
|
@ -129,7 +130,7 @@
|
||||||
android:minHeight="96dp"
|
android:minHeight="96dp"
|
||||||
tools:ignore="ContentDescription,UnusedAttribute">
|
tools:ignore="ContentDescription,UnusedAttribute">
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/previousButton"
|
android:id="@+id/previousButton"
|
||||||
android:layout_width="52dp"
|
android:layout_width="52dp"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
|
@ -143,7 +144,7 @@
|
||||||
app:srcCompat="@drawable/ic_skip_previous_white_24dp"
|
app:srcCompat="@drawable/ic_skip_previous_white_24dp"
|
||||||
tools:ignore="MissingPrefix" />
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/nextButton"
|
android:id="@+id/nextButton"
|
||||||
android:layout_width="52dp"
|
android:layout_width="52dp"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
|
@ -157,7 +158,7 @@
|
||||||
app:srcCompat="@drawable/ic_skip_next_white_24dp"
|
app:srcCompat="@drawable/ic_skip_next_white_24dp"
|
||||||
tools:ignore="MissingPrefix" />
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/repeatButton"
|
android:id="@+id/repeatButton"
|
||||||
android:layout_width="52dp"
|
android:layout_width="52dp"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
|
@ -170,7 +171,7 @@
|
||||||
app:srcCompat="@drawable/ic_repeat_white_24dp"
|
app:srcCompat="@drawable/ic_repeat_white_24dp"
|
||||||
tools:ignore="MissingPrefix" />
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/shuffleButton"
|
android:id="@+id/shuffleButton"
|
||||||
android:layout_width="52dp"
|
android:layout_width="52dp"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
|
|
|
@ -50,12 +50,13 @@
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar"
|
style="@style/Toolbar"
|
||||||
app:titleMarginStart="0dp"
|
app:titleMarginStart="0dp"
|
||||||
|
app:title="@string/library"
|
||||||
tools:ignore="UnusedAttribute" />
|
tools:ignore="UnusedAttribute" />
|
||||||
|
|
||||||
<ViewStub
|
<ViewStub
|
||||||
android:id="@+id/cab_stub"
|
android:id="@+id/cab_stub"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="48dp" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp">
|
android:paddingEnd="12dp">
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/songCurrentProgress"
|
android:id="@+id/songCurrentProgress"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/songTotalTime"
|
android:id="@+id/songTotalTime"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -85,14 +85,15 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<SeekBar
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
android:id="@+id/progressSlider"
|
android:id="@+id/progressSlider"
|
||||||
|
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toLeftOf="@id/songTotalTime"
|
android:layout_toLeftOf="@id/songTotalTime"
|
||||||
android:layout_toRightOf="@id/songCurrentProgress"
|
android:layout_toRightOf="@id/songCurrentProgress"
|
||||||
android:maxHeight="3dp"
|
android:maxHeight="2dp"
|
||||||
android:progressDrawable="@drawable/color_progress_seek"
|
android:progressDrawable="@drawable/color_progress_seek"
|
||||||
android:splitTrack="false"
|
android:splitTrack="false"
|
||||||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp">
|
android:paddingEnd="12dp">
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/songCurrentProgress"
|
android:id="@+id/songCurrentProgress"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/songTotalTime"
|
android:id="@+id/songTotalTime"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -43,8 +43,9 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<SeekBar
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
android:id="@+id/progressSlider"
|
android:id="@+id/progressSlider"
|
||||||
|
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
|
@ -105,7 +106,7 @@
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
tools:ignore="ContentDescription,UnusedAttribute">
|
tools:ignore="ContentDescription,UnusedAttribute">
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/previousButton"
|
android:id="@+id/previousButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -119,7 +120,7 @@
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:tint="@color/md_black_1000" />
|
tools:tint="@color/md_black_1000" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/nextButton"
|
android:id="@+id/nextButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -133,7 +134,7 @@
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:tint="@color/md_black_1000" />
|
tools:tint="@color/md_black_1000" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/repeatButton"
|
android:id="@+id/repeatButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -146,7 +147,7 @@
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:tint="@color/md_black_1000" />
|
tools:tint="@color/md_black_1000" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/shuffleButton"
|
android:id="@+id/shuffleButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -165,11 +166,10 @@
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:layout_centerInParent="true" />
|
android:layout_centerInParent="true" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/playPauseButton"
|
android:id="@+id/playPauseButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_above="@id/title_container"
|
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:background="?attr/roundSelector"
|
android:background="?attr/roundSelector"
|
||||||
app:srcCompat="@drawable/ic_pause_white_big"
|
app:srcCompat="@drawable/ic_pause_white_big"
|
||||||
|
|
|
@ -88,6 +88,5 @@
|
||||||
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="3dp"
|
android:layout_height="3dp"
|
||||||
android:progress="20"
|
android:progress="20" />
|
||||||
android:progressDrawable="@drawable/color_progress_seek" />
|
|
||||||
</code.name.monkey.retromusic.views.FitSystemWindowsLayout>
|
</code.name.monkey.retromusic.views.FitSystemWindowsLayout>
|
|
@ -12,7 +12,7 @@
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp">
|
android:paddingEnd="12dp">
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/songCurrentProgress"
|
android:id="@+id/songCurrentProgress"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/songTotalTime"
|
android:id="@+id/songTotalTime"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -40,15 +40,16 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<SeekBar
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
android:id="@+id/progressSlider"
|
android:id="@+id/progressSlider"
|
||||||
|
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toLeftOf="@id/songTotalTime"
|
android:layout_toLeftOf="@id/songTotalTime"
|
||||||
android:layout_toRightOf="@id/songCurrentProgress"
|
|
||||||
android:maxHeight="3dp"
|
|
||||||
android:progressDrawable="@drawable/color_progress_seek"
|
android:progressDrawable="@drawable/color_progress_seek"
|
||||||
|
android:layout_toRightOf="@id/songCurrentProgress"
|
||||||
|
android:maxHeight="2dp"
|
||||||
android:splitTrack="false"
|
android:splitTrack="false"
|
||||||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||||
tools:progress="20" />
|
tools:progress="20" />
|
||||||
|
|
|
@ -8,10 +8,60 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:ignore="MissingPrefix">
|
tools:ignore="MissingPrefix">
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:paddingStart="12dp"
|
||||||
|
android:paddingEnd="12dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
|
android:id="@+id/progressSlider"
|
||||||
|
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toLeftOf="@id/songTotalTime"
|
||||||
|
android:layout_toRightOf="@id/songCurrentProgress"
|
||||||
|
android:maxHeight="3dp"
|
||||||
|
android:progressDrawable="@drawable/color_progress_seek"
|
||||||
|
android:splitTrack="false"
|
||||||
|
android:thumb="@drawable/switch_thumb_material"
|
||||||
|
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||||
|
tools:progress="20" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/songTotalTime"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:gravity="center_vertical|right|end"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/songCurrentProgress"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:gravity="center_vertical|left|end"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
@ -48,54 +98,6 @@
|
||||||
android:textColor="?android:attr/textColorSecondary" />
|
android:textColor="?android:attr/textColorSecondary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="28dp"
|
|
||||||
android:paddingStart="12dp"
|
|
||||||
android:paddingEnd="12dp">
|
|
||||||
|
|
||||||
<SeekBar
|
|
||||||
android:id="@+id/progressSlider"
|
|
||||||
style="@style/MusicProgressSlider"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toLeftOf="@id/songTotalTime"
|
|
||||||
android:layout_toRightOf="@id/songCurrentProgress"
|
|
||||||
android:maxHeight="3dp"
|
|
||||||
android:progressDrawable="@drawable/color_progress_seek"
|
|
||||||
android:splitTrack="false"
|
|
||||||
android:thumb="@drawable/switch_thumb_material"
|
|
||||||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
|
||||||
tools:progress="20" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/songTotalTime"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:fontFamily="sans-serif-medium"
|
|
||||||
android:gravity="center_vertical|right|end"
|
|
||||||
android:paddingRight="8dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
|
||||||
android:textColor="?android:textColorSecondary"
|
|
||||||
android:textSize="12sp"
|
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/songCurrentProgress"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:fontFamily="sans-serif-medium"
|
|
||||||
android:gravity="center_vertical|left|end"
|
|
||||||
android:paddingLeft="8dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
|
||||||
android:textColor="?android:textColorSecondary"
|
|
||||||
android:textSize="12sp"
|
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<include layout="@layout/media_button" />
|
<include layout="@layout/media_button" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
android:rotation="90"
|
android:rotation="90"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/playerRepeatButton"
|
android:id="@+id/playerRepeatButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:tint="@color/md_black_1000" />
|
tools:tint="@color/md_black_1000" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/playerShuffleButton"
|
android:id="@+id/playerShuffleButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -19,9 +19,12 @@
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatSeekBar
|
<androidx.appcompat.widget.AppCompatSeekBar
|
||||||
android:id="@+id/volumeSeekBar"
|
android:id="@+id/volumeSeekBar"
|
||||||
|
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:maxHeight="2dp"
|
||||||
|
android:progressDrawable="@drawable/color_progress_seek"
|
||||||
tools:progress="20" />
|
tools:progress="20" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.IconImageView
|
<code.name.monkey.retromusic.views.IconImageView
|
||||||
|
|
51
app/src/main/res/layout/item_list_no_image.xml
Normal file
51
app/src/main/res/layout/item_list_no_image.xml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="72dp"
|
||||||
|
android:foreground="?attr/rectSelector"
|
||||||
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:descendantFocusability="blocksDescendants"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="sans-serif"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="sans-serif"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
|
android:textColor="?android:textColorSecondary" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</FrameLayout>
|
|
@ -12,7 +12,7 @@
|
||||||
tools:ignore="ContentDescription,UnusedAttribute"
|
tools:ignore="ContentDescription,UnusedAttribute"
|
||||||
tools:showIn="@layout/fragment_player_playback_controls">
|
tools:showIn="@layout/fragment_player_playback_controls">
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/previousButton"
|
android:id="@+id/previousButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:tint="@color/md_black_1000" />
|
tools:tint="@color/md_black_1000" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/nextButton"
|
android:id="@+id/nextButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:tint="@color/md_black_1000" />
|
tools:tint="@color/md_black_1000" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/repeatButton"
|
android:id="@+id/repeatButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:tint="@color/md_black_1000" />
|
tools:tint="@color/md_black_1000" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/shuffleButton"
|
android:id="@+id/shuffleButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -72,11 +72,10 @@
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:layout_centerInParent="true" />
|
android:layout_centerInParent="true" />
|
||||||
|
|
||||||
<ImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/playPauseButton"
|
android:id="@+id/playPauseButton"
|
||||||
android:layout_width="52dp"
|
android:layout_width="52dp"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_above="@id/title_container"
|
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:background="@drawable/color_circle_gradient"
|
android:background="@drawable/color_circle_gradient"
|
||||||
android:elevation="4dp"
|
android:elevation="4dp"
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,69 @@
|
||||||
|
<?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"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:descendantFocusability="blocksDescendants"
|
||||||
|
android:focusable="true"
|
||||||
|
android:foreground="?attr/rectSelector"
|
||||||
|
android:minHeight="@dimen/md_listitem_height"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:paddingRight="16dp"
|
||||||
|
tools:gravity="start|center_vertical">
|
||||||
|
|
||||||
|
<code.name.monkey.appthemehelper.common.views.ATECheckBox
|
||||||
|
android:id="@+id/checkbox"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@null"
|
||||||
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
|
android:gravity="center_vertical" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:minHeight="@dimen/md_listitem_height"
|
||||||
|
android:paddingStart="@dimen/md_listitem_control_margin"
|
||||||
|
android:paddingLeft="@dimen/md_listitem_control_margin"
|
||||||
|
android:paddingTop="@dimen/md_listitem_vertical_margin_choice"
|
||||||
|
android:paddingBottom="@dimen/md_listitem_vertical_margin_choice"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textSize="@dimen/md_listitem_textsize"
|
||||||
|
tools:text="Item" />
|
||||||
|
|
||||||
|
<code.name.monkey.retromusic.views.IconImageView
|
||||||
|
android:id="@+id/drag_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
|
android:minHeight="@dimen/md_listitem_height"
|
||||||
|
android:tint="?attr/iconColor"
|
||||||
|
android:tintMode="src_in"
|
||||||
|
app:srcCompat="@drawable/ic_drag_vertical_white_24dp"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
|
@ -6,13 +6,4 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingEnd="8dp" >
|
android:paddingEnd="8dp" />
|
||||||
|
|
||||||
<!-- <fragment
|
|
||||||
android:id="@+id/volumeFragment"
|
|
||||||
android:name="code.name.monkey.retromusic.fragments.VolumeFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
tools:layout="@layout/fragment_volume" />-->
|
|
||||||
</FrameLayout>
|
|
|
@ -2,8 +2,7 @@
|
||||||
<resources>
|
<resources>
|
||||||
<item name="action_new_playlist" type="id" />
|
<item name="action_new_playlist" type="id" />
|
||||||
<item name="action_show_lyrics" type="id" />
|
<item name="action_show_lyrics" type="id" />
|
||||||
|
<item name="action_genre" type="id" />
|
||||||
|
|
||||||
<item name="action_album_sort_order_asc" type="id" />
|
<item name="action_album_sort_order_asc" type="id" />
|
||||||
<item name="action_album_sort_order_desc" type="id" />
|
<item name="action_album_sort_order_desc" type="id" />
|
||||||
<item name="action_album_sort_order_artist" type="id" />
|
<item name="action_album_sort_order_artist" type="id" />
|
||||||
|
@ -17,7 +16,6 @@
|
||||||
<item name="action_song_sort_order_year" type="id" />
|
<item name="action_song_sort_order_year" type="id" />
|
||||||
<item name="action_song_sort_order_date" type="id" />
|
<item name="action_song_sort_order_date" type="id" />
|
||||||
<item name="action_song_sort_order_composer" type="id" />
|
<item name="action_song_sort_order_composer" type="id" />
|
||||||
|
|
||||||
<item name="action_multi_select_adapter_check_all" type="id" />
|
<item name="action_multi_select_adapter_check_all" type="id" />
|
||||||
<item name="action_folder" type="id" />
|
<item name="action_folder" type="id" />
|
||||||
</resources>
|
</resources>
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<string name="you_have_to_select_at_least_one_category">You have to select at least one category.</string>
|
||||||
<string name="small">Small album</string>
|
<string name="small">Small album</string>
|
||||||
<string name="accent_color">Accent color</string>
|
<string name="accent_color">Accent color</string>
|
||||||
<string name="accent_color_desc">The theme accent color, defaults to teal</string>
|
<string name="accent_color_desc">The theme accent color, defaults to teal</string>
|
||||||
|
@ -601,6 +602,7 @@
|
||||||
<string name="pick_image_intent_text">Pick image</string>
|
<string name="pick_image_intent_text">Pick image</string>
|
||||||
<string name="set_photo">Set a profile photo</string>
|
<string name="set_photo">Set a profile photo</string>
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
|
<string name="pref_header_library">Library</string>
|
||||||
<string name="swipe_to_unlock">Swipe to unlock</string>
|
<string name="swipe_to_unlock">Swipe to unlock</string>
|
||||||
<string name="add_lyrics">Add lyrics</string>
|
<string name="add_lyrics">Add lyrics</string>
|
||||||
<string name="paste_lyrics_here">Paste lyrics here</string>
|
<string name="paste_lyrics_here">Paste lyrics here</string>
|
||||||
|
@ -625,4 +627,7 @@
|
||||||
<string name="action_play_all">Play all</string>
|
<string name="action_play_all">Play all</string>
|
||||||
<string name="start_play_music">Start playing music.</string>
|
<string name="start_play_music">Start playing music.</string>
|
||||||
<string name="keyboard">Keyboard</string>
|
<string name="keyboard">Keyboard</string>
|
||||||
|
<string name="reset_action">Reset</string>
|
||||||
|
<string name="library_categories">Library categories</string>
|
||||||
|
<string name="pref_summary_library_categories">Configure visibility and order of library categories.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
<style name="Toolbar">
|
<style name="Toolbar">
|
||||||
<item name="android:layout_width">match_parent</item>
|
<item name="android:layout_width">match_parent</item>
|
||||||
<item name="android:layout_height">50dp</item>
|
<item name="android:layout_height">48dp</item>
|
||||||
<item name="popupTheme">?toolbarPopupTheme</item>
|
<item name="popupTheme">?toolbarPopupTheme</item>
|
||||||
<item name="android:transitionName" tools:ignore="NewApi">toolbar</item>
|
<item name="android:transitionName" tools:ignore="NewApi">toolbar</item>
|
||||||
<item name="android:titleTextAppearance">@style/ToolbarTextAppearance</item>
|
<item name="android:titleTextAppearance">@style/ToolbarTextAppearance</item>
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
<code.name.monkey.retromusic.preferences.AlbumCoverStylePreference
|
<code.name.monkey.retromusic.preferences.AlbumCoverStylePreference
|
||||||
android:key="album_cover_style_id"
|
android:key="album_cover_style_id"
|
||||||
android:title="@string/pref_title_album_cover_style"
|
android:title="@string/pref_title_album_cover_style"
|
||||||
app:enableCopying="true" />
|
app:enableCopying="true"
|
||||||
|
app:icon="@drawable/ic_image_white_24dp" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.preferences.MaterialListPreference
|
<code.name.monkey.retromusic.preferences.MaterialListPreference
|
||||||
android:defaultValue="0"
|
android:defaultValue="0"
|
||||||
|
|
|
@ -37,28 +37,32 @@
|
||||||
app:enableCopying="true"
|
app:enableCopying="true"
|
||||||
app:icon="@drawable/ic_home_white_24dp" />
|
app:icon="@drawable/ic_home_white_24dp" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.preferences.MaterialListPreference
|
|
||||||
android:defaultValue="0"
|
|
||||||
android:entries="@array/pref_tab_text_mode_titles"
|
|
||||||
android:entryValues="@array/pref_tab_text_mode_values"
|
|
||||||
android:key="tab_text_mode"
|
|
||||||
android:negativeButtonText="@null"
|
|
||||||
android:positiveButtonText="@null"
|
|
||||||
android:title="@string/pref_title_tab_text_mode"
|
|
||||||
app:enableCopying="true" />
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="toggle_home_banner"
|
android:key="toggle_home_banner"
|
||||||
android:summary="@string/pref_summary_home_banner"
|
android:summary="@string/pref_summary_home_banner"
|
||||||
android:title="@string/pref_title_home_banner" />
|
android:title="@string/pref_title_home_banner" />
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_library">
|
||||||
android:defaultValue="false"
|
|
||||||
android:key="toggle_genre"
|
<code.name.monkey.retromusic.preferences.LibraryPreference
|
||||||
android:summary="@string/pref_summary_genre_toggle"
|
android:key="library_categories"
|
||||||
android:title="@string/pref_title_genre_toggle"
|
android:summary="@string/pref_summary_library_categories"
|
||||||
app:enableCopying="true"
|
android:title="@string/library_categories"
|
||||||
app:icon="@drawable/ic_guitar_acoustic_white_24dp" />
|
app:enableCopying="true"
|
||||||
|
app:icon="@drawable/ic_library_music_white_24dp" />
|
||||||
|
|
||||||
|
<code.name.monkey.retromusic.preferences.MaterialListPreference
|
||||||
|
android:defaultValue="0"
|
||||||
|
android:entries="@array/pref_tab_text_mode_titles"
|
||||||
|
android:entryValues="@array/pref_tab_text_mode_values"
|
||||||
|
android:key="tab_text_mode"
|
||||||
|
android:negativeButtonText="@null"
|
||||||
|
android:positiveButtonText="@null"
|
||||||
|
android:title="@string/pref_title_tab_text_mode"
|
||||||
|
app:enableCopying="true" />
|
||||||
|
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
|
||||||
|
|
||||||
|
|
||||||
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
|
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
|
||||||
</androidx.preference.PreferenceScreen>
|
</androidx.preference.PreferenceScreen>
|
Loading…
Reference in a new issue