Kotlin refactoring

This commit is contained in:
Hemanth S 2020-05-23 19:23:10 +05:30
parent e9bd24872f
commit 4056a0c1c5
56 changed files with 317 additions and 308 deletions

View file

@ -25,6 +25,7 @@
} }
</style> </style>
</head> </head>

View file

@ -53,6 +53,7 @@
font-size: 1rem; font-size: 1rem;
} }
{style-placeholder} {style-placeholder}
</style> </style>
</head> </head>
@ -74,6 +75,7 @@
<ul> <ul>
<li></li> <li></li>
</ul>--> </ul>-->
<p>*If you face any UI related issues you clear app data and cache, if itsnot working try to uninstall and install <p>*If you face any UI related issues you clear app data and cache, if itsnot working try to
uninstall and install
again. </p> again. </p>
</body> </body>

View file

@ -52,7 +52,6 @@ object Constants {
const val NUMBER_OF_TOP_TRACKS = 99 const val NUMBER_OF_TOP_TRACKS = 99
} }
const val LIBRARY_CATEGORIES = "library_categories" const val LIBRARY_CATEGORIES = "library_categories"

View file

@ -31,7 +31,10 @@ import code.name.monkey.retromusic.lyrics.LrcHelper
import code.name.monkey.retromusic.lyrics.LrcView import code.name.monkey.retromusic.lyrics.LrcView
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.model.lyrics.Lyrics import code.name.monkey.retromusic.model.lyrics.Lyrics
import code.name.monkey.retromusic.util.* import code.name.monkey.retromusic.util.LyricUtil
import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.PreferenceUtilKT
import code.name.monkey.retromusic.util.RetroUtil
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.input.getInputLayout import com.afollestad.materialdialogs.input.getInputLayout
import com.afollestad.materialdialogs.input.input import com.afollestad.materialdialogs.input.input

View file

@ -33,8 +33,6 @@ import kotlinx.android.synthetic.main.activity_search.*
import java.util.* import java.util.*
import javax.inject.Inject import javax.inject.Inject
import kotlin.collections.ArrayList import kotlin.collections.ArrayList
import kotlin.collections.MutableList
import kotlin.collections.emptyList
class SearchActivity : AbsMusicServiceActivity(), OnQueryTextListener, TextWatcher, SearchView { class SearchActivity : AbsMusicServiceActivity(), OnQueryTextListener, TextWatcher, SearchView {
@Inject @Inject

View file

@ -4,8 +4,6 @@ import android.os.Bundle
import android.view.MenuItem import android.view.MenuItem
import androidx.annotation.StringRes import androidx.annotation.StringRes
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.activities.base.AbsBaseActivity import code.name.monkey.retromusic.activities.base.AbsBaseActivity
import code.name.monkey.retromusic.extensions.applyToolbar import code.name.monkey.retromusic.extensions.applyToolbar
@ -23,7 +21,6 @@ class SettingsActivity : AbsBaseActivity() {
setStatusbarColorAuto() setStatusbarColorAuto()
setNavigationbarColorAuto() setNavigationbarColorAuto()
setLightNavigationBar(true) setLightNavigationBar(true)
setupToolbar() setupToolbar()
if (savedInstanceState == null) { if (savedInstanceState == null) {
@ -49,7 +46,6 @@ class SettingsActivity : AbsBaseActivity() {
fragmentTransaction.replace(R.id.contentFrame, fragment, fragment.tag) fragmentTransaction.replace(R.id.contentFrame, fragment, fragment.tag)
fragmentTransaction.addToBackStack(null) fragmentTransaction.addToBackStack(null)
fragmentTransaction.commit() fragmentTransaction.commit()
setTitle(titleName) setTitle(titleName)
} }

View file

@ -22,12 +22,9 @@ import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.R.drawable import code.name.monkey.retromusic.R.drawable
import code.name.monkey.retromusic.activities.base.AbsBaseActivity import code.name.monkey.retromusic.activities.base.AbsBaseActivity
import code.name.monkey.retromusic.activities.saf.SAFGuideActivity import code.name.monkey.retromusic.activities.saf.SAFGuideActivity
import code.name.monkey.retromusic.util.RetroUtil import code.name.monkey.retromusic.util.RetroUtil
import code.name.monkey.retromusic.util.SAFUtil import code.name.monkey.retromusic.util.SAFUtil
import com.afollestad.materialdialogs.LayoutMode
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
import com.afollestad.materialdialogs.list.listItems import com.afollestad.materialdialogs.list.listItems
import com.google.android.material.button.MaterialButton import com.google.android.material.button.MaterialButton
import kotlinx.android.synthetic.main.activity_album_tag_editor.* import kotlinx.android.synthetic.main.activity_album_tag_editor.*

View file

@ -42,8 +42,7 @@ public class CategoryInfoAdapter extends RecyclerView.Adapter<CategoryInfoAdapte
private List<CategoryInfo> categoryInfos; private List<CategoryInfo> categoryInfos;
private ItemTouchHelper touchHelper; private ItemTouchHelper touchHelper;
public CategoryInfoAdapter(@NonNull List<CategoryInfo> categoryInfos) { public CategoryInfoAdapter() {
this.categoryInfos = categoryInfos;
SwipeAndDragHelper swipeAndDragHelper = new SwipeAndDragHelper(this); SwipeAndDragHelper swipeAndDragHelper = new SwipeAndDragHelper(this);
touchHelper = new ItemTouchHelper(swipeAndDragHelper); touchHelper = new ItemTouchHelper(swipeAndDragHelper);
} }

View file

@ -36,7 +36,8 @@ class LastAddedShortcutType(context: Context) : BaseShortcutType(context) {
context, context,
R.drawable.ic_app_shortcut_last_added R.drawable.ic_app_shortcut_last_added
) )
).setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_LAST_ADDED)).build() ).setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_LAST_ADDED))
.build()
companion object { companion object {

View file

@ -34,7 +34,8 @@ class SearchShortCutType(context: Context) : BaseShortcutType(context) {
get() = ShortcutInfo.Builder( get() = ShortcutInfo.Builder(
context, context,
id id
).setShortLabel(context.getString(R.string.action_search)).setLongLabel(context.getString(R.string.search_hint)).setIcon( ).setShortLabel(context.getString(R.string.action_search))
.setLongLabel(context.getString(R.string.search_hint)).setIcon(
AppShortcutIconGenerator.generateThemedIcon( AppShortcutIconGenerator.generateThemedIcon(
context, context,
R.drawable.ic_app_shortcut_search R.drawable.ic_app_shortcut_search

View file

@ -34,7 +34,8 @@ class ShuffleAllShortcutType(context: Context) : BaseShortcutType(context) {
AppShortcutIconGenerator.generateThemedIcon( AppShortcutIconGenerator.generateThemedIcon(
context, R.drawable.ic_app_shortcut_shuffle_all context, R.drawable.ic_app_shortcut_shuffle_all
) )
).setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_SHUFFLE_ALL)).build() ).setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_SHUFFLE_ALL))
.build()
companion object { companion object {

View file

@ -34,7 +34,8 @@ class TopTracksShortcutType(context: Context) : BaseShortcutType(context) {
AppShortcutIconGenerator.generateThemedIcon( AppShortcutIconGenerator.generateThemedIcon(
context, R.drawable.ic_app_shortcut_top_tracks context, R.drawable.ic_app_shortcut_top_tracks
) )
).setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_TOP_TRACKS)).build() ).setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_TOP_TRACKS))
.build()
companion object { companion object {

View file

@ -193,7 +193,8 @@ class AppWidgetBig : BaseAppWidget() {
* Link up various button actions using [PendingIntent]. * Link up various button actions using [PendingIntent].
*/ */
private fun linkButtons(context: Context, views: RemoteViews) { private fun linkButtons(context: Context, views: RemoteViews) {
val action = Intent(context, MainActivity::class.java).putExtra(MainActivity.EXPAND_PANEL, true) val action =
Intent(context, MainActivity::class.java).putExtra(MainActivity.EXPAND_PANEL, true)
var pendingIntent: PendingIntent var pendingIntent: PendingIntent
val serviceName = ComponentName(context, MusicService::class.java) val serviceName = ComponentName(context, MusicService::class.java)

View file

@ -21,10 +21,7 @@ import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.loaders.PlaylistLoader import code.name.monkey.retromusic.loaders.PlaylistLoader
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.PlaylistsUtil import code.name.monkey.retromusic.util.PlaylistsUtil
import com.afollestad.materialdialogs.LayoutMode
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
import com.afollestad.materialdialogs.list.listItems import com.afollestad.materialdialogs.list.listItems
class AddToPlaylistDialog : DialogFragment() { class AddToPlaylistDialog : DialogFragment() {

View file

@ -23,10 +23,7 @@ import android.os.Environment
import androidx.core.app.ActivityCompat import androidx.core.app.ActivityCompat
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import com.afollestad.materialdialogs.LayoutMode
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
import com.afollestad.materialdialogs.list.listItems import com.afollestad.materialdialogs.list.listItems
import java.io.File import java.io.File
import java.util.* import java.util.*

View file

@ -20,10 +20,7 @@ import androidx.core.text.HtmlCompat
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist
import com.afollestad.materialdialogs.LayoutMode
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
class ClearSmartPlaylistDialog : DialogFragment() { class ClearSmartPlaylistDialog : DialogFragment() {

View file

@ -26,10 +26,7 @@ import code.name.monkey.retromusic.R.string
import code.name.monkey.retromusic.extensions.appHandleColor import code.name.monkey.retromusic.extensions.appHandleColor
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.PlaylistsUtil import code.name.monkey.retromusic.util.PlaylistsUtil
import com.afollestad.materialdialogs.LayoutMode
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.afollestad.materialdialogs.customview.getCustomView import com.afollestad.materialdialogs.customview.getCustomView
import com.google.android.material.textfield.TextInputEditText import com.google.android.material.textfield.TextInputEditText

View file

@ -22,10 +22,7 @@ import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.R.string import code.name.monkey.retromusic.R.string
import code.name.monkey.retromusic.model.Playlist import code.name.monkey.retromusic.model.Playlist
import code.name.monkey.retromusic.util.PlaylistsUtil import code.name.monkey.retromusic.util.PlaylistsUtil
import com.afollestad.materialdialogs.LayoutMode
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
import java.util.* import java.util.*
class DeletePlaylistDialog : DialogFragment() { class DeletePlaylistDialog : DialogFragment() {

View file

@ -25,15 +25,13 @@ import code.name.monkey.retromusic.activities.saf.SAFGuideActivity
import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.SAFUtil import code.name.monkey.retromusic.util.SAFUtil
import com.afollestad.materialdialogs.LayoutMode
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
class DeleteSongsDialog : DialogFragment() { class DeleteSongsDialog : DialogFragment() {
@JvmField @JvmField
var currentSong: Song? = null var currentSong: Song? = null
@JvmField @JvmField
var songsToRemove: List<Song>? = null var songsToRemove: List<Song>? = null

View file

@ -22,10 +22,7 @@ import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.R.string import code.name.monkey.retromusic.R.string
import code.name.monkey.retromusic.model.PlaylistSong import code.name.monkey.retromusic.model.PlaylistSong
import code.name.monkey.retromusic.util.PlaylistsUtil import code.name.monkey.retromusic.util.PlaylistsUtil
import com.afollestad.materialdialogs.LayoutMode
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
class RemoveFromPlaylistDialog : DialogFragment() { class RemoveFromPlaylistDialog : DialogFragment() {

View file

@ -25,10 +25,7 @@ import code.name.monkey.retromusic.R.layout
import code.name.monkey.retromusic.R.string import code.name.monkey.retromusic.R.string
import code.name.monkey.retromusic.extensions.appHandleColor import code.name.monkey.retromusic.extensions.appHandleColor
import code.name.monkey.retromusic.util.PlaylistsUtil import code.name.monkey.retromusic.util.PlaylistsUtil
import com.afollestad.materialdialogs.LayoutMode
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.afollestad.materialdialogs.customview.getCustomView import com.afollestad.materialdialogs.customview.getCustomView
import com.google.android.material.textfield.TextInputEditText import com.google.android.material.textfield.TextInputEditText

View file

@ -29,10 +29,7 @@ import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.R.string import code.name.monkey.retromusic.R.string
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
import com.afollestad.materialdialogs.LayoutMode
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.afollestad.materialdialogs.customview.getCustomView import com.afollestad.materialdialogs.customview.getCustomView
import org.jaudiotagger.audio.AudioFileIO import org.jaudiotagger.audio.AudioFileIO

View file

@ -22,10 +22,7 @@ import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.activities.ShareInstagramStory import code.name.monkey.retromusic.activities.ShareInstagramStory
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
import com.afollestad.materialdialogs.LayoutMode
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
import com.afollestad.materialdialogs.list.listItems import com.afollestad.materialdialogs.list.listItems
class SongShareDialog : DialogFragment() { class SongShareDialog : DialogFragment() {

View file

@ -26,9 +26,12 @@ import androidx.annotation.DimenRes
import androidx.annotation.DrawableRes import androidx.annotation.DrawableRes
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.util.DensityUtil
fun Context.scaledDrawableResources(@DrawableRes id: Int, @DimenRes width: Int, @DimenRes height: Int): Drawable { fun Context.scaledDrawableResources(
@DrawableRes id: Int,
@DimenRes width: Int,
@DimenRes height: Int
): Drawable {
val w = resources.getDimension(width).toInt() val w = resources.getDimension(width).toInt()
val h = resources.getDimension(height).toInt() val h = resources.getDimension(height).toInt()
return scaledDrawable(id, w, h) return scaledDrawable(id, w, h)

View file

@ -64,9 +64,11 @@ abstract class AbsPlayerControlsFragment : AbsMusicServiceFragment(),
private fun hideVolumeIfAvailable() { private fun hideVolumeIfAvailable() {
if (PreferenceUtilKT.isVolumeVisibilityMode) { if (PreferenceUtilKT.isVolumeVisibilityMode) {
childFragmentManager.beginTransaction().replace(R.id.volumeFragmentContainer, VolumeFragment()).commit() childFragmentManager.beginTransaction()
.replace(R.id.volumeFragmentContainer, VolumeFragment()).commit()
childFragmentManager.executePendingTransactions() childFragmentManager.executePendingTransactions()
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragmentContainer) as VolumeFragment? volumeFragment =
childFragmentManager.findFragmentById(R.id.volumeFragmentContainer) as VolumeFragment?
} }
} }

View file

@ -25,22 +25,9 @@ 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.PreferenceUtilKT import code.name.monkey.retromusic.util.PreferenceUtilKT
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.* import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.*
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.nextButton
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.playPauseButton
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.previousButton
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.progressSlider
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.repeatButton
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.shuffleButton
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.songCurrentProgress
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.songInfo
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.songTotalTime
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.text
import kotlinx.android.synthetic.main.fragment_blur_player_playback_controls.title
import kotlinx.android.synthetic.main.fragment_player_playback_controls.*
class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() { class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() {

View file

@ -19,11 +19,10 @@ import android.graphics.drawable.ColorDrawable
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import android.widget.Toast import android.widget.Toast
import androidx.fragment.app.DialogFragment
import androidx.preference.ListPreference import androidx.preference.ListPreference
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.PreferenceManager import androidx.preference.PreferenceManager
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceFragmentCompat
import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.preferences.* import code.name.monkey.retromusic.preferences.*
@ -33,7 +32,7 @@ import code.name.monkey.retromusic.util.NavigationUtil
* @author Hemanth S (h4h13). * @author Hemanth S (h4h13).
*/ */
abstract class AbsSettingsFragment : ATEPreferenceFragmentCompat() { abstract class AbsSettingsFragment : PreferenceFragmentCompat() {
internal fun showProToastAndNavigate(message: String) { internal fun showProToastAndNavigate(message: String) {
Toast.makeText(requireContext(), "$message is Pro version feature.", Toast.LENGTH_SHORT) Toast.makeText(requireContext(), "$message is Pro version feature.", Toast.LENGTH_SHORT)
@ -73,16 +72,25 @@ abstract class AbsSettingsFragment : ATEPreferenceFragmentCompat() {
invalidateSettings() invalidateSettings()
} }
override fun onCreatePreferenceDialog(preference: Preference): DialogFragment? { override fun onDisplayPreferenceDialog(preference: Preference?) {
return when (preference) { when (preference) {
is LibraryPreference -> LibraryPreferenceDialog.newInstance() is LibraryPreference -> {
is NowPlayingScreenPreference -> NowPlayingScreenPreferenceDialog.newInstance(preference.key) val fragment = LibraryPreferenceDialog.newInstance()
is AlbumCoverStylePreference -> AlbumCoverStylePreferenceDialog.newInstance(preference.key) fragment.show(childFragmentManager, preference.key)
is MaterialListPreference -> {
MaterialListPreferenceDialog.newInstance(preference)
} }
is BlacklistPreference -> BlacklistPreferenceDialog.newInstance() is NowPlayingScreenPreference -> {
else -> super.onCreatePreferenceDialog(preference) val fragment = NowPlayingScreenPreferenceDialog.newInstance()
fragment.show(childFragmentManager, preference.key)
}
is AlbumCoverStylePreference -> {
val fragment = AlbumCoverStylePreferenceDialog.newInstance()
fragment.show(childFragmentManager, preference.key)
}
is BlacklistPreference -> {
val fragment = BlacklistPreferenceDialog.newInstance()
fragment.show(childFragmentManager, preference.key)
}
else -> super.onDisplayPreferenceDialog(preference)
} }
} }
} }

View file

@ -99,6 +99,7 @@ class EqualizerHelper private constructor() : EqualizerInterface {
companion object { companion object {
private val TAG = "EqualizerHelper" private val TAG = "EqualizerHelper"
@Volatile @Volatile
private var ourInstance: EqualizerHelper? = null private var ourInstance: EqualizerHelper? = null

View file

@ -28,6 +28,7 @@ object SearchQueryHelper {
private const val ARTIST_SELECTION = "lower(" + MediaStore.Audio.AudioColumns.ARTIST + ") = ?" private const val ARTIST_SELECTION = "lower(" + MediaStore.Audio.AudioColumns.ARTIST + ") = ?"
private const val AND = " AND " private const val AND = " AND "
var songs = ArrayList<Song>() var songs = ArrayList<Song>()
@JvmStatic @JvmStatic
fun getSongs(context: Context, extras: Bundle): ArrayList<Song> { fun getSongs(context: Context, extras: Bundle): ArrayList<Song> {
val query = extras.getString(SearchManager.QUERY, null) val query = extras.getString(SearchManager.QUERY, null)

View file

@ -35,7 +35,6 @@ import android.view.animation.DecelerateInterpolator
import android.widget.OverScroller import android.widget.OverScroller
import androidx.annotation.ColorInt import androidx.annotation.ColorInt
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat
import androidx.core.view.ViewCompat import androidx.core.view.ViewCompat
import code.name.monkey.retromusic.BuildConfig import code.name.monkey.retromusic.BuildConfig
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R

View file

@ -27,7 +27,7 @@ import android.widget.TextView
import android.widget.Toast import android.widget.Toast
import androidx.core.graphics.BlendModeColorFilterCompat import androidx.core.graphics.BlendModeColorFilterCompat
import androidx.core.graphics.BlendModeCompat.SRC_IN import androidx.core.graphics.BlendModeCompat.SRC_IN
import androidx.preference.PreferenceDialogFragmentCompat import androidx.fragment.app.DialogFragment
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.common.prefs.supportv7.ATEDialogPreference import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
@ -37,12 +37,10 @@ import code.name.monkey.retromusic.extensions.colorControlNormal
import code.name.monkey.retromusic.fragments.AlbumCoverStyle import code.name.monkey.retromusic.fragments.AlbumCoverStyle
import code.name.monkey.retromusic.fragments.AlbumCoverStyle.* import code.name.monkey.retromusic.fragments.AlbumCoverStyle.*
import code.name.monkey.retromusic.util.NavigationUtil import code.name.monkey.retromusic.util.NavigationUtil
import code.name.monkey.retromusic.util.PreferenceUtilKT import code.name.monkey.retromusic.util.PreferenceUtilKT
import code.name.monkey.retromusic.util.ViewUtil import code.name.monkey.retromusic.util.ViewUtil
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.customview.customView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.google.android.material.dialog.MaterialAlertDialogBuilder
class AlbumCoverStylePreference @JvmOverloads constructor( class AlbumCoverStylePreference @JvmOverloads constructor(
context: Context, context: Context,
@ -66,10 +64,8 @@ class AlbumCoverStylePreference @JvmOverloads constructor(
} }
} }
class AlbumCoverStylePreferenceDialog : PreferenceDialogFragmentCompat(), class AlbumCoverStylePreferenceDialog : DialogFragment(),
ViewPager.OnPageChangeListener { ViewPager.OnPageChangeListener {
override fun onDialogClosed(positiveResult: Boolean) {
}
private var viewPagerPosition: Int = 0 private var viewPagerPosition: Int = 0
@ -83,10 +79,9 @@ class AlbumCoverStylePreferenceDialog : PreferenceDialogFragmentCompat(),
viewPager.pageMargin = ViewUtil.convertDpToPixel(32f, resources).toInt() viewPager.pageMargin = ViewUtil.convertDpToPixel(32f, resources).toInt()
viewPager.currentItem = PreferenceUtilKT.albumCoverStyle.ordinal viewPager.currentItem = PreferenceUtilKT.albumCoverStyle.ordinal
return MaterialDialog(requireActivity()).show { return MaterialAlertDialogBuilder(requireActivity())
title(R.string.pref_title_album_cover_style) .setTitle(R.string.pref_title_album_cover_style)
.setPositiveButton(R.string.set) { _, _ ->
positiveButton(R.string.set) {
val coverStyle = values()[viewPagerPosition] val coverStyle = values()[viewPagerPosition]
if (isAlbumCoverStyle(coverStyle)) { if (isAlbumCoverStyle(coverStyle)) {
val result = getString(coverStyle.titleRes) + " theme is Pro version feature." val result = getString(coverStyle.titleRes) + " theme is Pro version feature."
@ -96,9 +91,11 @@ class AlbumCoverStylePreferenceDialog : PreferenceDialogFragmentCompat(),
PreferenceUtilKT.albumCoverStyle = coverStyle PreferenceUtilKT.albumCoverStyle = coverStyle
} }
} }
negativeButton(android.R.string.cancel) .setNegativeButton(android.R.string.cancel) { _, _ ->
customView(view = view, scrollable = false, noVerticalPadding = false) dismiss()
} }
.setView(view)
.create()
} }
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
@ -162,12 +159,8 @@ class AlbumCoverStylePreferenceDialog : PreferenceDialogFragmentCompat(),
companion object { companion object {
val TAG: String = AlbumCoverStylePreferenceDialog::class.java.simpleName val TAG: String = AlbumCoverStylePreferenceDialog::class.java.simpleName
fun newInstance(key: String): AlbumCoverStylePreferenceDialog { fun newInstance(): AlbumCoverStylePreferenceDialog {
val bundle = Bundle() return AlbumCoverStylePreferenceDialog()
bundle.putString(ARG_KEY, key)
val fragment = AlbumCoverStylePreferenceDialog()
fragment.arguments = bundle
return fragment
} }
} }
} }

View file

@ -63,7 +63,6 @@ class BlacklistPreferenceDialog : DialogFragment(), BlacklistFolderChooserDialog
refreshBlacklistData() refreshBlacklistData()
return MaterialDialog(requireContext()).show { return MaterialDialog(requireContext()).show {
title(R.string.blacklist) title(R.string.blacklist)
positiveButton(android.R.string.ok) { positiveButton(android.R.string.ok) {
dismiss() dismiss()
} }

View file

@ -14,15 +14,17 @@
package code.name.monkey.retromusic.preferences package code.name.monkey.retromusic.preferences
import android.annotation.SuppressLint
import android.app.Dialog import android.app.Dialog
import android.content.Context import android.content.Context
import android.os.Bundle import android.os.Bundle
import android.util.AttributeSet import android.util.AttributeSet
import android.view.LayoutInflater import android.view.LayoutInflater
import android.widget.Toast import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.core.graphics.BlendModeColorFilterCompat import androidx.core.graphics.BlendModeColorFilterCompat
import androidx.core.graphics.BlendModeCompat.SRC_IN import androidx.core.graphics.BlendModeCompat.SRC_IN
import androidx.preference.PreferenceDialogFragmentCompat import androidx.fragment.app.DialogFragment
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
@ -30,60 +32,52 @@ import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.adapter.CategoryInfoAdapter import code.name.monkey.retromusic.adapter.CategoryInfoAdapter
import code.name.monkey.retromusic.extensions.colorControlNormal import code.name.monkey.retromusic.extensions.colorControlNormal
import code.name.monkey.retromusic.model.CategoryInfo import code.name.monkey.retromusic.model.CategoryInfo
import code.name.monkey.retromusic.util.PreferenceUtilKT import code.name.monkey.retromusic.util.PreferenceUtilKT
import com.afollestad.materialdialogs.MaterialDialog import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.afollestad.materialdialogs.customview.customView
class LibraryPreference @JvmOverloads constructor( class LibraryPreference @JvmOverloads constructor(
context: Context, context: Context,
attrs: AttributeSet? = null, attrs: AttributeSet? = null,
defStyleAttr: Int = -1, defStyleAttr: Int = 0,
defStyleRes: Int = -1 defStyleRes: Int = 0
) : ) : ATEDialogPreference(context, attrs, defStyleAttr, defStyleRes) {
ATEDialogPreference(context, attrs, defStyleAttr, defStyleRes) {
init { init {
icon?.colorFilter = icon?.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(
BlendModeColorFilterCompat.createBlendModeColorFilterCompat(
context.colorControlNormal(), context.colorControlNormal(),
SRC_IN SRC_IN
) )
} }
} }
class LibraryPreferenceDialog : PreferenceDialogFragmentCompat() { class LibraryPreferenceDialog : DialogFragment() {
override fun onDialogClosed(positiveResult: Boolean) {
}
lateinit var adapter: CategoryInfoAdapter
@SuppressLint("InflateParams")
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val view = LayoutInflater.from(requireContext()) val view = LayoutInflater.from(requireContext())
.inflate(R.layout.preference_dialog_library_categories, null) .inflate(R.layout.preference_dialog_library_categories, null)
adapter = CategoryInfoAdapter(PreferenceUtilKT.libraryCategory)
val categoryAdapter = CategoryInfoAdapter()
categoryAdapter.categoryInfos = PreferenceUtilKT.libraryCategory
val recyclerView = view.findViewById<RecyclerView>(R.id.recycler_view) val recyclerView = view.findViewById<RecyclerView>(R.id.recycler_view)
recyclerView.layoutManager = LinearLayoutManager(activity) recyclerView.layoutManager = LinearLayoutManager(activity)
recyclerView.adapter = adapter recyclerView.adapter = categoryAdapter
categoryAdapter.attachToRecyclerView(recyclerView)
adapter.attachToRecyclerView(recyclerView)
return MaterialDialog(requireContext()) return MaterialAlertDialogBuilder(requireContext())
.title(R.string.library_categories) .setTitle(R.string.library_categories)
.customView(view = view) .setNeutralButton(
.positiveButton(android.R.string.ok) { R.string.reset_action
updateCategories(adapter.categoryInfos) ) { _, _ ->
dismiss() categoryAdapter.categoryInfos = PreferenceUtilKT.defaultCategories
} }
.negativeButton(android.R.string.cancel) { .setNegativeButton(android.R.string.cancel, null)
dismiss() .setPositiveButton(
} android.R.string.ok
.neutralButton(R.string.reset_action) { ) { _, _ -> updateCategories(categoryAdapter.categoryInfos) }
adapter.categoryInfos = PreferenceUtilKT.defaultCategories .setView(view)
} .create()
.noAutoDismiss()
} }
private fun updateCategories(categories: List<CategoryInfo>) { private fun updateCategories(categories: List<CategoryInfo>) {

View file

@ -26,7 +26,7 @@ import android.widget.TextView
import android.widget.Toast import android.widget.Toast
import androidx.core.graphics.BlendModeColorFilterCompat import androidx.core.graphics.BlendModeColorFilterCompat
import androidx.core.graphics.BlendModeCompat.SRC_IN import androidx.core.graphics.BlendModeCompat.SRC_IN
import androidx.preference.PreferenceDialogFragmentCompat import androidx.fragment.app.DialogFragment
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.common.prefs.supportv7.ATEDialogPreference import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
@ -38,9 +38,8 @@ import code.name.monkey.retromusic.fragments.NowPlayingScreen.*
import code.name.monkey.retromusic.util.NavigationUtil import code.name.monkey.retromusic.util.NavigationUtil
import code.name.monkey.retromusic.util.PreferenceUtilKT import code.name.monkey.retromusic.util.PreferenceUtilKT
import code.name.monkey.retromusic.util.ViewUtil import code.name.monkey.retromusic.util.ViewUtil
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.customview.customView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.google.android.material.dialog.MaterialAlertDialogBuilder
class NowPlayingScreenPreference @JvmOverloads constructor( class NowPlayingScreenPreference @JvmOverloads constructor(
context: Context, context: Context,
@ -63,8 +62,7 @@ class NowPlayingScreenPreference @JvmOverloads constructor(
} }
} }
class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(), class NowPlayingScreenPreferenceDialog : DialogFragment(), ViewPager.OnPageChangeListener {
ViewPager.OnPageChangeListener {
private var viewPagerPosition: Int = 0 private var viewPagerPosition: Int = 0
@ -78,9 +76,6 @@ class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(),
this.viewPagerPosition = position this.viewPagerPosition = position
} }
override fun onDialogClosed(positiveResult: Boolean) {
}
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val view = LayoutInflater.from(requireContext()) val view = LayoutInflater.from(requireContext())
.inflate(R.layout.preference_dialog_now_playing_screen, null) .inflate(R.layout.preference_dialog_now_playing_screen, null)
@ -91,7 +86,23 @@ class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(),
viewPager.pageMargin = ViewUtil.convertDpToPixel(32f, resources).toInt() viewPager.pageMargin = ViewUtil.convertDpToPixel(32f, resources).toInt()
viewPager.currentItem = PreferenceUtilKT.nowPlayingScreen.ordinal viewPager.currentItem = PreferenceUtilKT.nowPlayingScreen.ordinal
return MaterialDialog(requireContext()).show { return MaterialAlertDialogBuilder(requireContext())
.setTitle(R.string.pref_title_now_playing_screen_appearance)
.setCancelable(false)
.setPositiveButton(R.string.set) { _, _ ->
val nowPlayingScreen = values()[viewPagerPosition]
if (isNowPlayingThemes(nowPlayingScreen)) {
val result =
getString(nowPlayingScreen.titleRes) + " theme is Pro version feature."
Toast.makeText(context, result, Toast.LENGTH_SHORT).show()
NavigationUtil.goToProVersion(requireContext())
} else {
PreferenceUtilKT.nowPlayingScreen = nowPlayingScreen
}
}
.setView(view)
.create()
/*.show {
title(R.string.pref_title_now_playing_screen_appearance) title(R.string.pref_title_now_playing_screen_appearance)
positiveButton(R.string.set) { positiveButton(R.string.set) {
val nowPlayingScreen = values()[viewPagerPosition] val nowPlayingScreen = values()[viewPagerPosition]
@ -107,16 +118,12 @@ class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(),
negativeButton(android.R.string.cancel) negativeButton(android.R.string.cancel)
customView(view = view, scrollable = false, noVerticalPadding = false) customView(view = view, scrollable = false, noVerticalPadding = false)
} }*/
} }
companion object { companion object {
fun newInstance(key: String): NowPlayingScreenPreferenceDialog { fun newInstance(): NowPlayingScreenPreferenceDialog {
val bundle = Bundle() return NowPlayingScreenPreferenceDialog()
bundle.putString(ARG_KEY, key)
val fragment = NowPlayingScreenPreferenceDialog()
fragment.arguments = bundle
return fragment
} }
} }
} }

View file

@ -20,11 +20,9 @@ import android.content.SharedPreferences
import android.graphics.Color import android.graphics.Color
import android.net.Uri import android.net.Uri
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import com.afollestad.materialdialogs.LayoutMode
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.WhichButton import com.afollestad.materialdialogs.WhichButton
import com.afollestad.materialdialogs.actions.getActionButton import com.afollestad.materialdialogs.actions.getActionButton
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
object AppRater { object AppRater {
private const val DO_NOT_SHOW_AGAIN = "do_not_show_again"// Package Name private const val DO_NOT_SHOW_AGAIN = "do_not_show_again"// Package Name
@ -34,6 +32,7 @@ object AppRater {
private const val DAYS_UNTIL_PROMPT = 3//Min number of days private const val DAYS_UNTIL_PROMPT = 3//Min number of days
private const val LAUNCHES_UNTIL_PROMPT = 5//Min number of launches private const val LAUNCHES_UNTIL_PROMPT = 5//Min number of launches
@JvmStatic @JvmStatic
fun appLaunched(context: Context) { fun appLaunched(context: Context) {
val prefs = context.getSharedPreferences(APP_RATING, 0) val prefs = context.getSharedPreferences(APP_RATING, 0)

View file

@ -10,6 +10,7 @@ object PremiumShow {
private const val PREF_NAME = "premium_show" private const val PREF_NAME = "premium_show"
private const val LAUNCH_COUNT = "launch_count" private const val LAUNCH_COUNT = "launch_count"
private const val DATE_FIRST_LAUNCH = "date_first_launch" private const val DATE_FIRST_LAUNCH = "date_first_launch"
@JvmStatic @JvmStatic
fun launch(context: Context) { fun launch(context: Context) {
val pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE) val pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE)

View file

@ -26,9 +26,7 @@ import android.widget.Toast
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil.getSongFileUri import code.name.monkey.retromusic.util.MusicUtil.getSongFileUri
import com.afollestad.materialdialogs.LayoutMode
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
class RingtoneManager(val context: Context) { class RingtoneManager(val context: Context) {
fun setRingtone(song: Song) { fun setRingtone(song: Song) {

View file

@ -41,7 +41,8 @@ object ViewUtil {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1) { if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1) {
val layerDrawable = progressSlider.progressDrawable as LayerDrawable val layerDrawable = progressSlider.progressDrawable as LayerDrawable
val progressDrawable = layerDrawable.findDrawableByLayerId(android.R.id.progress) val progressDrawable = layerDrawable.findDrawableByLayerId(android.R.id.progress)
progressDrawable.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(newColor, SRC_IN) progressDrawable.colorFilter =
BlendModeColorFilterCompat.createBlendModeColorFilterCompat(newColor, SRC_IN)
} else { } else {
progressSlider.progressTintList = ColorStateList.valueOf(newColor) progressSlider.progressTintList = ColorStateList.valueOf(newColor)
} }

View file

@ -4,7 +4,8 @@
android:viewportWidth="26.086956" android:viewportWidth="26.086956"
android:viewportHeight="26.086956" android:viewportHeight="26.086956"
android:tint="#FFFFFF"> android:tint="#FFFFFF">
<group android:translateX="1.0434783" <group
android:translateX="1.0434783"
android:translateY="1.0434783"> android:translateY="1.0434783">
<path <path
android:fillColor="#FF000000" android:fillColor="#FF000000"

View file

@ -4,7 +4,8 @@
android:height="108dp" android:height="108dp"
android:viewportWidth="921.0526" android:viewportWidth="921.0526"
android:viewportHeight="921.0526"> android:viewportHeight="921.0526">
<group android:translateX="322.5263" <group
android:translateX="322.5263"
android:translateY="285.5263"> android:translateY="285.5263">
<path <path
android:pathData="M10.256,0L265.4,0C268.967,0 270.26,0.371 271.563,1.069C272.867,1.766 273.89,2.789 274.587,4.093C275.285,5.396 275.656,6.689 275.656,10.256L275.656,177.191C275.656,180.757 275.285,182.05 274.587,183.353C273.89,184.657 272.867,185.68 271.563,186.378C270.26,187.075 268.967,187.446 265.4,187.446L10.256,187.446C6.689,187.446 5.396,187.075 4.093,186.378C2.789,185.68 1.766,184.657 1.069,183.353C0.371,182.05 0,180.757 -0,177.191L0,10.256C-0,6.689 0.371,5.396 1.069,4.093C1.766,2.789 2.789,1.766 4.093,1.069C5.396,0.371 6.689,0 10.256,0Z" android:pathData="M10.256,0L265.4,0C268.967,0 270.26,0.371 271.563,1.069C272.867,1.766 273.89,2.789 274.587,4.093C275.285,5.396 275.656,6.689 275.656,10.256L275.656,177.191C275.656,180.757 275.285,182.05 274.587,183.353C273.89,184.657 272.867,185.68 271.563,186.378C270.26,187.075 268.967,187.446 265.4,187.446L10.256,187.446C6.689,187.446 5.396,187.075 4.093,186.378C2.789,185.68 1.766,184.657 1.069,183.353C0.371,182.05 0,180.757 -0,177.191L0,10.256C-0,6.689 0.371,5.396 1.069,4.093C1.766,2.789 2.789,1.766 4.093,1.069C5.396,0.371 6.689,0 10.256,0Z"
@ -17,8 +18,12 @@
android:centerX="0" android:centerX="0"
android:centerY="0" android:centerY="0"
android:type="radial"> android:type="radial">
<item android:offset="0" android:color="#FF3D5AFE"/> <item
<item android:offset="1" android:color="#FF651FFF"/> android:offset="0"
android:color="#FF3D5AFE" />
<item
android:offset="1"
android:color="#FF651FFF" />
</gradient> </gradient>
</aapt:attr> </aapt:attr>
</path> </path>
@ -33,8 +38,12 @@
android:centerX="-32.788143" android:centerX="-32.788143"
android:centerY="67.34283" android:centerY="67.34283"
android:type="radial"> android:type="radial">
<item android:offset="0" android:color="#FF3D5AFE"/> <item
<item android:offset="1" android:color="#FF651FFF"/> android:offset="0"
android:color="#FF3D5AFE" />
<item
android:offset="1"
android:color="#FF651FFF" />
</gradient> </gradient>
</aapt:attr> </aapt:attr>
</path> </path>
@ -49,8 +58,12 @@
android:centerX="-268.79202" android:centerX="-268.79202"
android:centerY="57.347355" android:centerY="57.347355"
android:type="radial"> android:type="radial">
<item android:offset="0" android:color="#FF3D5AFE"/> <item
<item android:offset="1" android:color="#FF651FFF"/> android:offset="0"
android:color="#FF3D5AFE" />
<item
android:offset="1"
android:color="#FF651FFF" />
</gradient> </gradient>
</aapt:attr> </aapt:attr>
</path> </path>

View file

@ -1,5 +1,10 @@
<vector android:height="24dp" android:tint="#FFFFFF" <vector android:height="24dp"
android:viewportHeight="24.0" android:viewportWidth="24.0" android:tint="#FFFFFF"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> android:viewportHeight="24.0"
<path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z"/> android:viewportWidth="24.0"
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="#FF000000"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z" />
</vector> </vector>

View file

@ -1,5 +1,10 @@
<vector android:height="24dp" android:tint="#FFFFFF" <vector android:height="24dp"
android:viewportHeight="24.0" android:viewportWidth="24.0" android:tint="#FFFFFF"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> android:viewportHeight="24.0"
<path android:fillColor="#FF000000" android:pathData="M12,8l-6,6 1.41,1.41L12,10.83l4.59,4.58L18,14z"/> android:viewportWidth="24.0"
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="#FF000000"
android:pathData="M12,8l-6,6 1.41,1.41L12,10.83l4.59,4.58L18,14z" />
</vector> </vector>

View file

@ -1,5 +1,10 @@
<vector android:height="24dp" android:tint="#FFFFFF" <vector android:height="24dp"
android:viewportHeight="24.0" android:viewportWidth="24.0" android:tint="#FFFFFF"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> android:viewportHeight="24.0"
<path android:fillColor="#FF000000" android:pathData="M17.66,7.93L12,2.27 6.34,7.93c-3.12,3.12 -3.12,8.19 0,11.31C7.9,20.8 9.95,21.58 12,21.58c2.05,0 4.1,-0.78 5.66,-2.34 3.12,-3.12 3.12,-8.19 0,-11.31zM12,19.59c-1.6,0 -3.11,-0.62 -4.24,-1.76C6.62,16.69 6,15.19 6,13.59s0.62,-3.11 1.76,-4.24L12,5.1v14.49z"/> android:viewportWidth="24.0"
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="#FF000000"
android:pathData="M17.66,7.93L12,2.27 6.34,7.93c-3.12,3.12 -3.12,8.19 0,11.31C7.9,20.8 9.95,21.58 12,21.58c2.05,0 4.1,-0.78 5.66,-2.34 3.12,-3.12 3.12,-8.19 0,-11.31zM12,19.59c-1.6,0 -3.11,-0.62 -4.24,-1.76C6.62,16.69 6,15.19 6,13.59s0.62,-3.11 1.76,-4.24L12,5.1v14.49z" />
</vector> </vector>

View file

@ -15,8 +15,12 @@
android:centerX="0" android:centerX="0"
android:centerY="0" android:centerY="0"
android:type="radial"> android:type="radial">
<item android:offset="0" android:color="#FF3D5AFE"/> <item
<item android:offset="1" android:color="#FF651FFF"/> android:offset="0"
android:color="#FF3D5AFE" />
<item
android:offset="1"
android:color="#FF651FFF" />
</gradient> </gradient>
</aapt:attr> </aapt:attr>
</path> </path>
@ -31,8 +35,12 @@
android:centerX="-32.788143" android:centerX="-32.788143"
android:centerY="67.34283" android:centerY="67.34283"
android:type="radial"> android:type="radial">
<item android:offset="0" android:color="#FF3D5AFE"/> <item
<item android:offset="1" android:color="#FF651FFF"/> android:offset="0"
android:color="#FF3D5AFE" />
<item
android:offset="1"
android:color="#FF651FFF" />
</gradient> </gradient>
</aapt:attr> </aapt:attr>
</path> </path>
@ -47,8 +55,12 @@
android:centerX="-268.79202" android:centerX="-268.79202"
android:centerY="57.347355" android:centerY="57.347355"
android:type="radial"> android:type="radial">
<item android:offset="0" android:color="#FF3D5AFE"/> <item
<item android:offset="1" android:color="#FF651FFF"/> android:offset="0"
android:color="#FF3D5AFE" />
<item
android:offset="1"
android:color="#FF651FFF" />
</gradient> </gradient>
</aapt:attr> </aapt:attr>
</path> </path>

View file

@ -67,6 +67,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
tools:text="@tools:sample/full_names" tools:text="@tools:sample/full_names"
tools:textColor="@color/md_black_1000" /> tools:textColor="@color/md_black_1000" />
<View <View
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"

View file

@ -5,16 +5,19 @@
<style name="Theme.RetroMusic.Light" parent="Theme.RetroMusic.Base.Light"> <style name="Theme.RetroMusic.Light" parent="Theme.RetroMusic.Base.Light">
<item name="android:windowBackground">@color/window_color_light</item> <item name="android:windowBackground">@color/window_color_light</item>
<item name="android:scrollbars">none</item> <item name="android:scrollbars">none</item>
<item name="dialogCornerRadius">16dp</item>
</style> </style>
<style name="Theme.RetroMusic.Black" parent="Theme.RetroMusic.Base.Black"> <style name="Theme.RetroMusic.Black" parent="Theme.RetroMusic.Base.Black">
<item name="android:windowBackground">@color/window_color_dark</item> <item name="android:windowBackground">@color/window_color_dark</item>
<item name="android:scrollbars">none</item> <item name="android:scrollbars">none</item>
<item name="dialogCornerRadius">16dp</item>
</style> </style>
<style name="Theme.RetroMusic.FollowSystem" parent="Theme.RetroMusic.Base.Adaptive"> <style name="Theme.RetroMusic.FollowSystem" parent="Theme.RetroMusic.Base.Adaptive">
<item name="android:windowBackground">@color/window_color</item> <item name="android:windowBackground">@color/window_color</item>
<item name="android:scrollbars">none</item> <item name="android:scrollbars">none</item>
<item name="dialogCornerRadius">16dp</item>
</style> </style>
<style name="Theme.RetroMusic.Notification" parent="@android:style/TextAppearance.StatusBar.EventContent" /> <style name="Theme.RetroMusic.Notification" parent="@android:style/TextAppearance.StatusBar.EventContent" />

View file

@ -17,7 +17,7 @@
android:layout="@layout/preference_category_title" android:layout="@layout/preference_category_title"
android:title="@string/pref_header_playlists"> android:title="@string/pref_header_playlists">
<code.name.monkey.retromusic.preferences.MaterialListPreference <code.name.monkey.appthemehelper.common.prefs.supportv7.ATEListPreference
android:defaultValue="this_month" android:defaultValue="this_month"
android:entries="@array/pref_playlists_last_added_interval_titles" android:entries="@array/pref_playlists_last_added_interval_titles"
android:entryValues="@array/pref_playlists_last_added_interval_values" android:entryValues="@array/pref_playlists_last_added_interval_values"