Kotlin refactoring
This commit is contained in:
parent
e9bd24872f
commit
4056a0c1c5
56 changed files with 317 additions and 308 deletions
|
@ -25,6 +25,7 @@
|
|||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
|
|
@ -53,27 +53,29 @@
|
|||
font-size: 1rem;
|
||||
}
|
||||
{style-placeholder}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h5>April 30, 2020</h5>
|
||||
<h2>v3.5.110</h2>
|
||||
<span class="tag"><i>Beta version</i></span>
|
||||
<h3><span class="colorHeader">What's New</span></h3>
|
||||
<ul>
|
||||
<li>Changed profile form image to icon</li>
|
||||
<li>New what's new screen</li>
|
||||
<li>Added In-App language changer, where you can select language </li>
|
||||
</ul>
|
||||
<h3><span class="colorHeader">Improved</span></h3>
|
||||
<ul>
|
||||
<li>Improved loading of Songs, Albums, Artists, Genres, Playlists </li>
|
||||
</ul>
|
||||
<!--<h3><span class="colorHeader">Bug fixes</span></h3>
|
||||
<ul>
|
||||
<li></li>
|
||||
</ul>-->
|
||||
<p>*If you face any UI related issues you clear app data and cache, if itsnot working try to uninstall and install
|
||||
again. </p>
|
||||
<h5>April 30, 2020</h5>
|
||||
<h2>v3.5.110</h2>
|
||||
<span class="tag"><i>Beta version</i></span>
|
||||
<h3><span class="colorHeader">What's New</span></h3>
|
||||
<ul>
|
||||
<li>Changed profile form image to icon</li>
|
||||
<li>New what's new screen</li>
|
||||
<li>Added In-App language changer, where you can select language</li>
|
||||
</ul>
|
||||
<h3><span class="colorHeader">Improved</span></h3>
|
||||
<ul>
|
||||
<li>Improved loading of Songs, Albums, Artists, Genres, Playlists</li>
|
||||
</ul>
|
||||
<!--<h3><span class="colorHeader">Bug fixes</span></h3>
|
||||
<ul>
|
||||
<li></li>
|
||||
</ul>-->
|
||||
<p>*If you face any UI related issues you clear app data and cache, if itsnot working try to
|
||||
uninstall and install
|
||||
again. </p>
|
||||
</body>
|
|
@ -52,7 +52,6 @@ object Constants {
|
|||
const val NUMBER_OF_TOP_TRACKS = 99
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const val LIBRARY_CATEGORIES = "library_categories"
|
||||
|
|
|
@ -31,7 +31,10 @@ import code.name.monkey.retromusic.lyrics.LrcHelper
|
|||
import code.name.monkey.retromusic.lyrics.LrcView
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
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.input.getInputLayout
|
||||
import com.afollestad.materialdialogs.input.input
|
||||
|
|
|
@ -33,8 +33,6 @@ import kotlinx.android.synthetic.main.activity_search.*
|
|||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
import kotlin.collections.ArrayList
|
||||
import kotlin.collections.MutableList
|
||||
import kotlin.collections.emptyList
|
||||
|
||||
class SearchActivity : AbsMusicServiceActivity(), OnQueryTextListener, TextWatcher, SearchView {
|
||||
@Inject
|
||||
|
|
|
@ -4,8 +4,6 @@ import android.os.Bundle
|
|||
import android.view.MenuItem
|
||||
import androidx.annotation.StringRes
|
||||
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.activities.base.AbsBaseActivity
|
||||
import code.name.monkey.retromusic.extensions.applyToolbar
|
||||
|
@ -23,7 +21,6 @@ class SettingsActivity : AbsBaseActivity() {
|
|||
setStatusbarColorAuto()
|
||||
setNavigationbarColorAuto()
|
||||
setLightNavigationBar(true)
|
||||
|
||||
setupToolbar()
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
|
@ -49,7 +46,6 @@ class SettingsActivity : AbsBaseActivity() {
|
|||
fragmentTransaction.replace(R.id.contentFrame, fragment, fragment.tag)
|
||||
fragmentTransaction.addToBackStack(null)
|
||||
fragmentTransaction.commit()
|
||||
|
||||
setTitle(titleName)
|
||||
}
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ abstract class AbsBaseActivity : AbsThemeActivity() {
|
|||
}
|
||||
}
|
||||
hadPermissions = true
|
||||
onHasPermissionsChanged(true)
|
||||
onHasPermissionsChanged(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,12 +22,9 @@ import code.name.monkey.retromusic.R
|
|||
import code.name.monkey.retromusic.R.drawable
|
||||
import code.name.monkey.retromusic.activities.base.AbsBaseActivity
|
||||
import code.name.monkey.retromusic.activities.saf.SAFGuideActivity
|
||||
|
||||
import code.name.monkey.retromusic.util.RetroUtil
|
||||
import code.name.monkey.retromusic.util.SAFUtil
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
import com.afollestad.materialdialogs.list.listItems
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import kotlinx.android.synthetic.main.activity_album_tag_editor.*
|
||||
|
|
|
@ -42,8 +42,7 @@ public class CategoryInfoAdapter extends RecyclerView.Adapter<CategoryInfoAdapte
|
|||
private List<CategoryInfo> categoryInfos;
|
||||
private ItemTouchHelper touchHelper;
|
||||
|
||||
public CategoryInfoAdapter(@NonNull List<CategoryInfo> categoryInfos) {
|
||||
this.categoryInfos = categoryInfos;
|
||||
public CategoryInfoAdapter() {
|
||||
SwipeAndDragHelper swipeAndDragHelper = new SwipeAndDragHelper(this);
|
||||
touchHelper = new ItemTouchHelper(swipeAndDragHelper);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,8 @@ class LastAddedShortcutType(context: Context) : BaseShortcutType(context) {
|
|||
context,
|
||||
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 {
|
||||
|
||||
|
|
|
@ -34,7 +34,8 @@ class SearchShortCutType(context: Context) : BaseShortcutType(context) {
|
|||
get() = ShortcutInfo.Builder(
|
||||
context,
|
||||
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(
|
||||
context,
|
||||
R.drawable.ic_app_shortcut_search
|
||||
|
|
|
@ -34,7 +34,8 @@ class ShuffleAllShortcutType(context: Context) : BaseShortcutType(context) {
|
|||
AppShortcutIconGenerator.generateThemedIcon(
|
||||
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 {
|
||||
|
||||
|
|
|
@ -34,7 +34,8 @@ class TopTracksShortcutType(context: Context) : BaseShortcutType(context) {
|
|||
AppShortcutIconGenerator.generateThemedIcon(
|
||||
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 {
|
||||
|
||||
|
|
|
@ -193,7 +193,8 @@ class AppWidgetBig : BaseAppWidget() {
|
|||
* Link up various button actions using [PendingIntent].
|
||||
*/
|
||||
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
|
||||
|
||||
val serviceName = ComponentName(context, MusicService::class.java)
|
||||
|
|
|
@ -21,10 +21,7 @@ import code.name.monkey.retromusic.R
|
|||
import code.name.monkey.retromusic.loaders.PlaylistLoader
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.util.PlaylistsUtil
|
||||
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
import com.afollestad.materialdialogs.list.listItems
|
||||
|
||||
class AddToPlaylistDialog : DialogFragment() {
|
||||
|
|
|
@ -23,10 +23,7 @@ import android.os.Environment
|
|||
import androidx.core.app.ActivityCompat
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import code.name.monkey.retromusic.R
|
||||
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
import com.afollestad.materialdialogs.list.listItems
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
|
|
|
@ -20,10 +20,7 @@ import androidx.core.text.HtmlCompat
|
|||
import androidx.fragment.app.DialogFragment
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist
|
||||
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
|
||||
|
||||
class ClearSmartPlaylistDialog : DialogFragment() {
|
||||
|
|
|
@ -26,10 +26,7 @@ import code.name.monkey.retromusic.R.string
|
|||
import code.name.monkey.retromusic.extensions.appHandleColor
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.util.PlaylistsUtil
|
||||
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
import com.afollestad.materialdialogs.customview.customView
|
||||
import com.afollestad.materialdialogs.customview.getCustomView
|
||||
import com.google.android.material.textfield.TextInputEditText
|
||||
|
|
|
@ -22,10 +22,7 @@ import code.name.monkey.retromusic.R
|
|||
import code.name.monkey.retromusic.R.string
|
||||
import code.name.monkey.retromusic.model.Playlist
|
||||
import code.name.monkey.retromusic.util.PlaylistsUtil
|
||||
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
import java.util.*
|
||||
|
||||
class DeletePlaylistDialog : DialogFragment() {
|
||||
|
|
|
@ -25,15 +25,13 @@ import code.name.monkey.retromusic.activities.saf.SAFGuideActivity
|
|||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.SAFUtil
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
|
||||
class DeleteSongsDialog : DialogFragment() {
|
||||
@JvmField
|
||||
var currentSong: Song? = null
|
||||
|
||||
@JvmField
|
||||
var songsToRemove: List<Song>? = null
|
||||
|
||||
|
|
|
@ -22,10 +22,7 @@ import code.name.monkey.retromusic.R
|
|||
import code.name.monkey.retromusic.R.string
|
||||
import code.name.monkey.retromusic.model.PlaylistSong
|
||||
import code.name.monkey.retromusic.util.PlaylistsUtil
|
||||
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
|
||||
class RemoveFromPlaylistDialog : DialogFragment() {
|
||||
|
||||
|
|
|
@ -25,10 +25,7 @@ import code.name.monkey.retromusic.R.layout
|
|||
import code.name.monkey.retromusic.R.string
|
||||
import code.name.monkey.retromusic.extensions.appHandleColor
|
||||
import code.name.monkey.retromusic.util.PlaylistsUtil
|
||||
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
import com.afollestad.materialdialogs.customview.customView
|
||||
import com.afollestad.materialdialogs.customview.getCustomView
|
||||
import com.google.android.material.textfield.TextInputEditText
|
||||
|
|
|
@ -29,10 +29,7 @@ import code.name.monkey.retromusic.R
|
|||
import code.name.monkey.retromusic.R.string
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
import com.afollestad.materialdialogs.customview.customView
|
||||
import com.afollestad.materialdialogs.customview.getCustomView
|
||||
import org.jaudiotagger.audio.AudioFileIO
|
||||
|
|
|
@ -22,10 +22,7 @@ import code.name.monkey.retromusic.R
|
|||
import code.name.monkey.retromusic.activities.ShareInstagramStory
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
import com.afollestad.materialdialogs.list.listItems
|
||||
|
||||
class SongShareDialog : DialogFragment() {
|
||||
|
|
|
@ -26,9 +26,12 @@ import androidx.annotation.DimenRes
|
|||
import androidx.annotation.DrawableRes
|
||||
import androidx.core.content.ContextCompat
|
||||
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 h = resources.getDimension(height).toInt()
|
||||
return scaledDrawable(id, w, h)
|
||||
|
|
|
@ -20,7 +20,7 @@ class AlbumViewModel(application: Application) : AndroidViewModel(application) {
|
|||
val result = RepositoryImpl(getApplication()).allAlbums()
|
||||
if (result is Result.Success) {
|
||||
albums.value = result.data
|
||||
}else {
|
||||
} else {
|
||||
albums.value = listOf()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,9 +64,11 @@ abstract class AbsPlayerControlsFragment : AbsMusicServiceFragment(),
|
|||
|
||||
private fun hideVolumeIfAvailable() {
|
||||
if (PreferenceUtilKT.isVolumeVisibilityMode) {
|
||||
childFragmentManager.beginTransaction().replace(R.id.volumeFragmentContainer, VolumeFragment()).commit()
|
||||
childFragmentManager.beginTransaction()
|
||||
.replace(R.id.volumeFragmentContainer, VolumeFragment()).commit()
|
||||
childFragmentManager.executePendingTransactions()
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragmentContainer) as VolumeFragment?
|
||||
volumeFragment =
|
||||
childFragmentManager.findFragmentById(R.id.volumeFragmentContainer) as VolumeFragment?
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class GenreViewModel(application: Application) : AndroidViewModel(application) {
|
|||
val result = RepositoryImpl(getApplication()).allGenres()
|
||||
if (result is Success) {
|
||||
genres.value = result.data
|
||||
}else {
|
||||
} else {
|
||||
genres.value = listOf()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,22 +25,9 @@ import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
|||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtilKT
|
||||
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.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() {
|
||||
|
||||
|
|
|
@ -19,11 +19,10 @@ import android.graphics.drawable.ColorDrawable
|
|||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.preference.ListPreference
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
import androidx.preference.PreferenceManager
|
||||
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceFragmentCompat
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.preferences.*
|
||||
|
@ -33,7 +32,7 @@ import code.name.monkey.retromusic.util.NavigationUtil
|
|||
* @author Hemanth S (h4h13).
|
||||
*/
|
||||
|
||||
abstract class AbsSettingsFragment : ATEPreferenceFragmentCompat() {
|
||||
abstract class AbsSettingsFragment : PreferenceFragmentCompat() {
|
||||
|
||||
internal fun showProToastAndNavigate(message: String) {
|
||||
Toast.makeText(requireContext(), "$message is Pro version feature.", Toast.LENGTH_SHORT)
|
||||
|
@ -73,16 +72,25 @@ abstract class AbsSettingsFragment : ATEPreferenceFragmentCompat() {
|
|||
invalidateSettings()
|
||||
}
|
||||
|
||||
override fun onCreatePreferenceDialog(preference: Preference): DialogFragment? {
|
||||
return when (preference) {
|
||||
is LibraryPreference -> LibraryPreferenceDialog.newInstance()
|
||||
is NowPlayingScreenPreference -> NowPlayingScreenPreferenceDialog.newInstance(preference.key)
|
||||
is AlbumCoverStylePreference -> AlbumCoverStylePreferenceDialog.newInstance(preference.key)
|
||||
is MaterialListPreference -> {
|
||||
MaterialListPreferenceDialog.newInstance(preference)
|
||||
override fun onDisplayPreferenceDialog(preference: Preference?) {
|
||||
when (preference) {
|
||||
is LibraryPreference -> {
|
||||
val fragment = LibraryPreferenceDialog.newInstance()
|
||||
fragment.show(childFragmentManager, preference.key)
|
||||
}
|
||||
is BlacklistPreference -> BlacklistPreferenceDialog.newInstance()
|
||||
else -> super.onCreatePreferenceDialog(preference)
|
||||
is NowPlayingScreenPreference -> {
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import code.name.monkey.retromusic.util.NavigationUtil
|
|||
class AudioSettings : AbsSettingsFragment() {
|
||||
override fun invalidateSettings() {
|
||||
val findPreference: Preference = findPreference("equalizer")!!
|
||||
if (!hasEqualizer() ) {
|
||||
if (!hasEqualizer()) {
|
||||
findPreference.isEnabled = false
|
||||
findPreference.summary = resources.getString(R.string.no_equalizer)
|
||||
} else {
|
||||
|
|
|
@ -34,7 +34,7 @@ abstract class RetroMusicColoredTarget(view: ImageView) : BitmapPaletteTarget(vi
|
|||
|
||||
override fun onLoadFailed(e: Exception?, errorDrawable: Drawable?) {
|
||||
super.onLoadFailed(e, errorDrawable)
|
||||
val colors = MediaNotificationProcessor(App.getContext(),errorDrawable)
|
||||
val colors = MediaNotificationProcessor(App.getContext(), errorDrawable)
|
||||
onColorReady(colors)
|
||||
/* MediaNotificationProcessor(App.getContext()).getPaletteAsync({
|
||||
onColorReady(it)
|
||||
|
|
|
@ -99,6 +99,7 @@ class EqualizerHelper private constructor() : EqualizerInterface {
|
|||
|
||||
companion object {
|
||||
private val TAG = "EqualizerHelper"
|
||||
|
||||
@Volatile
|
||||
private var ourInstance: EqualizerHelper? = null
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ object SearchQueryHelper {
|
|||
private const val ARTIST_SELECTION = "lower(" + MediaStore.Audio.AudioColumns.ARTIST + ") = ?"
|
||||
private const val AND = " AND "
|
||||
var songs = ArrayList<Song>()
|
||||
|
||||
@JvmStatic
|
||||
fun getSongs(context: Context, extras: Bundle): ArrayList<Song> {
|
||||
val query = extras.getString(SearchManager.QUERY, null)
|
||||
|
|
|
@ -35,7 +35,6 @@ import android.view.animation.DecelerateInterpolator
|
|||
import android.widget.OverScroller
|
||||
import androidx.annotation.ColorInt
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.core.view.ViewCompat
|
||||
import code.name.monkey.retromusic.BuildConfig
|
||||
import code.name.monkey.retromusic.R
|
||||
|
@ -216,9 +215,9 @@ class LrcView @JvmOverloads constructor(
|
|||
isAntiAlias = true
|
||||
textAlign = Paint.Align.LEFT
|
||||
textSize = mLrcTextSize
|
||||
/* if (BuildConfig.FLAVOR != "nofont") {
|
||||
typeface = ResourcesCompat.getFont(context, R.font.circular)
|
||||
}*/
|
||||
/* if (BuildConfig.FLAVOR != "nofont") {
|
||||
typeface = ResourcesCompat.getFont(context, R.font.circular)
|
||||
}*/
|
||||
}
|
||||
mDefaultContent = DEFAULT_CONTENT
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import android.widget.TextView
|
|||
import android.widget.Toast
|
||||
import androidx.core.graphics.BlendModeColorFilterCompat
|
||||
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.ViewPager
|
||||
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.util.NavigationUtil
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtilKT
|
||||
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.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
|
||||
class AlbumCoverStylePreference @JvmOverloads constructor(
|
||||
context: Context,
|
||||
|
@ -66,10 +64,8 @@ class AlbumCoverStylePreference @JvmOverloads constructor(
|
|||
}
|
||||
}
|
||||
|
||||
class AlbumCoverStylePreferenceDialog : PreferenceDialogFragmentCompat(),
|
||||
class AlbumCoverStylePreferenceDialog : DialogFragment(),
|
||||
ViewPager.OnPageChangeListener {
|
||||
override fun onDialogClosed(positiveResult: Boolean) {
|
||||
}
|
||||
|
||||
private var viewPagerPosition: Int = 0
|
||||
|
||||
|
@ -83,10 +79,9 @@ class AlbumCoverStylePreferenceDialog : PreferenceDialogFragmentCompat(),
|
|||
viewPager.pageMargin = ViewUtil.convertDpToPixel(32f, resources).toInt()
|
||||
viewPager.currentItem = PreferenceUtilKT.albumCoverStyle.ordinal
|
||||
|
||||
return MaterialDialog(requireActivity()).show {
|
||||
title(R.string.pref_title_album_cover_style)
|
||||
|
||||
positiveButton(R.string.set) {
|
||||
return MaterialAlertDialogBuilder(requireActivity())
|
||||
.setTitle(R.string.pref_title_album_cover_style)
|
||||
.setPositiveButton(R.string.set) { _, _ ->
|
||||
val coverStyle = values()[viewPagerPosition]
|
||||
if (isAlbumCoverStyle(coverStyle)) {
|
||||
val result = getString(coverStyle.titleRes) + " theme is Pro version feature."
|
||||
|
@ -96,9 +91,11 @@ class AlbumCoverStylePreferenceDialog : PreferenceDialogFragmentCompat(),
|
|||
PreferenceUtilKT.albumCoverStyle = coverStyle
|
||||
}
|
||||
}
|
||||
negativeButton(android.R.string.cancel)
|
||||
customView(view = view, scrollable = false, noVerticalPadding = false)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel) { _, _ ->
|
||||
dismiss()
|
||||
}
|
||||
.setView(view)
|
||||
.create()
|
||||
}
|
||||
|
||||
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
|
||||
|
@ -162,12 +159,8 @@ class AlbumCoverStylePreferenceDialog : PreferenceDialogFragmentCompat(),
|
|||
companion object {
|
||||
val TAG: String = AlbumCoverStylePreferenceDialog::class.java.simpleName
|
||||
|
||||
fun newInstance(key: String): AlbumCoverStylePreferenceDialog {
|
||||
val bundle = Bundle()
|
||||
bundle.putString(ARG_KEY, key)
|
||||
val fragment = AlbumCoverStylePreferenceDialog()
|
||||
fragment.arguments = bundle
|
||||
return fragment
|
||||
fun newInstance(): AlbumCoverStylePreferenceDialog {
|
||||
return AlbumCoverStylePreferenceDialog()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,6 @@ class BlacklistPreferenceDialog : DialogFragment(), BlacklistFolderChooserDialog
|
|||
refreshBlacklistData()
|
||||
return MaterialDialog(requireContext()).show {
|
||||
title(R.string.blacklist)
|
||||
|
||||
positiveButton(android.R.string.ok) {
|
||||
dismiss()
|
||||
}
|
||||
|
|
|
@ -14,15 +14,17 @@
|
|||
|
||||
package code.name.monkey.retromusic.preferences
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Dialog
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.graphics.BlendModeColorFilterCompat
|
||||
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.RecyclerView
|
||||
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.extensions.colorControlNormal
|
||||
import code.name.monkey.retromusic.model.CategoryInfo
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtilKT
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.customview.customView
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
|
||||
|
||||
class LibraryPreference @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = -1,
|
||||
defStyleRes: Int = -1
|
||||
) :
|
||||
ATEDialogPreference(context, attrs, defStyleAttr, defStyleRes) {
|
||||
|
||||
defStyleAttr: Int = 0,
|
||||
defStyleRes: Int = 0
|
||||
) : ATEDialogPreference(context, attrs, defStyleAttr, defStyleRes) {
|
||||
init {
|
||||
icon?.colorFilter =
|
||||
BlendModeColorFilterCompat.createBlendModeColorFilterCompat(
|
||||
context.colorControlNormal(),
|
||||
SRC_IN
|
||||
)
|
||||
icon?.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(
|
||||
context.colorControlNormal(),
|
||||
SRC_IN
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
class LibraryPreferenceDialog : PreferenceDialogFragmentCompat() {
|
||||
|
||||
override fun onDialogClosed(positiveResult: Boolean) {
|
||||
}
|
||||
|
||||
lateinit var adapter: CategoryInfoAdapter
|
||||
class LibraryPreferenceDialog : DialogFragment() {
|
||||
|
||||
@SuppressLint("InflateParams")
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val view = LayoutInflater.from(requireContext())
|
||||
.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)
|
||||
recyclerView.layoutManager = LinearLayoutManager(activity)
|
||||
recyclerView.adapter = adapter
|
||||
recyclerView.adapter = categoryAdapter
|
||||
categoryAdapter.attachToRecyclerView(recyclerView)
|
||||
|
||||
adapter.attachToRecyclerView(recyclerView)
|
||||
|
||||
return MaterialDialog(requireContext())
|
||||
.title(R.string.library_categories)
|
||||
.customView(view = view)
|
||||
.positiveButton(android.R.string.ok) {
|
||||
updateCategories(adapter.categoryInfos)
|
||||
dismiss()
|
||||
return MaterialAlertDialogBuilder(requireContext())
|
||||
.setTitle(R.string.library_categories)
|
||||
.setNeutralButton(
|
||||
R.string.reset_action
|
||||
) { _, _ ->
|
||||
categoryAdapter.categoryInfos = PreferenceUtilKT.defaultCategories
|
||||
}
|
||||
.negativeButton(android.R.string.cancel) {
|
||||
dismiss()
|
||||
}
|
||||
.neutralButton(R.string.reset_action) {
|
||||
adapter.categoryInfos = PreferenceUtilKT.defaultCategories
|
||||
}
|
||||
.noAutoDismiss()
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(
|
||||
android.R.string.ok
|
||||
) { _, _ -> updateCategories(categoryAdapter.categoryInfos) }
|
||||
.setView(view)
|
||||
.create()
|
||||
}
|
||||
|
||||
private fun updateCategories(categories: List<CategoryInfo>) {
|
||||
|
|
|
@ -26,7 +26,7 @@ import android.widget.TextView
|
|||
import android.widget.Toast
|
||||
import androidx.core.graphics.BlendModeColorFilterCompat
|
||||
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.ViewPager
|
||||
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.PreferenceUtilKT
|
||||
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.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
|
||||
class NowPlayingScreenPreference @JvmOverloads constructor(
|
||||
context: Context,
|
||||
|
@ -63,8 +62,7 @@ class NowPlayingScreenPreference @JvmOverloads constructor(
|
|||
}
|
||||
}
|
||||
|
||||
class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(),
|
||||
ViewPager.OnPageChangeListener {
|
||||
class NowPlayingScreenPreferenceDialog : DialogFragment(), ViewPager.OnPageChangeListener {
|
||||
|
||||
private var viewPagerPosition: Int = 0
|
||||
|
||||
|
@ -78,9 +76,6 @@ class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(),
|
|||
this.viewPagerPosition = position
|
||||
}
|
||||
|
||||
override fun onDialogClosed(positiveResult: Boolean) {
|
||||
}
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val view = LayoutInflater.from(requireContext())
|
||||
.inflate(R.layout.preference_dialog_now_playing_screen, null)
|
||||
|
@ -91,7 +86,23 @@ class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(),
|
|||
viewPager.pageMargin = ViewUtil.convertDpToPixel(32f, resources).toInt()
|
||||
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)
|
||||
positiveButton(R.string.set) {
|
||||
val nowPlayingScreen = values()[viewPagerPosition]
|
||||
|
@ -107,16 +118,12 @@ class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(),
|
|||
|
||||
negativeButton(android.R.string.cancel)
|
||||
customView(view = view, scrollable = false, noVerticalPadding = false)
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun newInstance(key: String): NowPlayingScreenPreferenceDialog {
|
||||
val bundle = Bundle()
|
||||
bundle.putString(ARG_KEY, key)
|
||||
val fragment = NowPlayingScreenPreferenceDialog()
|
||||
fragment.arguments = bundle
|
||||
return fragment
|
||||
fun newInstance(): NowPlayingScreenPreferenceDialog {
|
||||
return NowPlayingScreenPreferenceDialog()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,11 +20,9 @@ import android.content.SharedPreferences
|
|||
import android.graphics.Color
|
||||
import android.net.Uri
|
||||
import code.name.monkey.retromusic.R
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.WhichButton
|
||||
import com.afollestad.materialdialogs.actions.getActionButton
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
|
||||
object AppRater {
|
||||
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 LAUNCHES_UNTIL_PROMPT = 5//Min number of launches
|
||||
|
||||
@JvmStatic
|
||||
fun appLaunched(context: Context) {
|
||||
val prefs = context.getSharedPreferences(APP_RATING, 0)
|
||||
|
|
|
@ -10,6 +10,7 @@ object PremiumShow {
|
|||
private const val PREF_NAME = "premium_show"
|
||||
private const val LAUNCH_COUNT = "launch_count"
|
||||
private const val DATE_FIRST_LAUNCH = "date_first_launch"
|
||||
|
||||
@JvmStatic
|
||||
fun launch(context: Context) {
|
||||
val pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE)
|
||||
|
|
|
@ -26,9 +26,7 @@ import android.widget.Toast
|
|||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.util.MusicUtil.getSongFileUri
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
|
||||
class RingtoneManager(val context: Context) {
|
||||
fun setRingtone(song: Song) {
|
||||
|
|
|
@ -41,7 +41,8 @@ object ViewUtil {
|
|||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1) {
|
||||
val layerDrawable = progressSlider.progressDrawable as LayerDrawable
|
||||
val progressDrawable = layerDrawable.findDrawableByLayerId(android.R.id.progress)
|
||||
progressDrawable.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(newColor, SRC_IN)
|
||||
progressDrawable.colorFilter =
|
||||
BlendModeColorFilterCompat.createBlendModeColorFilterCompat(newColor, SRC_IN)
|
||||
} else {
|
||||
progressSlider.progressTintList = ColorStateList.valueOf(newColor)
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ public class PopupBackground extends Drawable {
|
|||
updatePath();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onBoundsChange(@NonNull Rect bounds) {
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
android:viewportWidth="26.086956"
|
||||
android:viewportHeight="26.086956"
|
||||
android:tint="#FFFFFF">
|
||||
<group android:translateX="1.0434783"
|
||||
android:translateY="1.0434783">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12,5v8.55c-0.94,-0.54 -2.1,-0.75 -3.33,-0.32 -1.34,0.48 -2.37,1.67 -2.61,3.07 -0.46,2.74 1.86,5.08 4.59,4.65 1.96,-0.31 3.35,-2.11 3.35,-4.1V7h2c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2h-2c-1.1,0 -2,0.9 -2,2z"/>
|
||||
</group>
|
||||
<group
|
||||
android:translateX="1.0434783"
|
||||
android:translateY="1.0434783">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12,5v8.55c-0.94,-0.54 -2.1,-0.75 -3.33,-0.32 -1.34,0.48 -2.37,1.67 -2.61,3.07 -0.46,2.74 1.86,5.08 4.59,4.65 1.96,-0.31 3.35,-2.11 3.35,-4.1V7h2c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2h-2c-1.1,0 -2,0.9 -2,2z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
|
|
@ -4,55 +4,68 @@
|
|||
android:height="108dp"
|
||||
android:viewportWidth="921.0526"
|
||||
android:viewportHeight="921.0526">
|
||||
<group android:translateX="322.5263"
|
||||
android:translateY="285.5263">
|
||||
<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:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="236.10738"
|
||||
android:centerX="0"
|
||||
android:centerY="0"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FF3D5AFE"/>
|
||||
<item android:offset="1" android:color="#FF651FFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M262.814,336.03L0.163,75.53L0.006,183.375C0.002,185.781 0.962,188.088 2.67,189.781L161.703,347.393C163.201,348.877 165.225,349.711 167.334,349.711L257.18,349.711C261.598,349.711 265.18,346.129 265.18,341.711C265.18,339.577 264.328,337.533 262.814,336.03Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="250.9684"
|
||||
android:centerX="-32.788143"
|
||||
android:centerY="67.34283"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FF3D5AFE"/>
|
||||
<item android:offset="1" android:color="#FF651FFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M8.035,349.71L59.204,349.71C63.623,349.71 67.204,346.128 67.204,341.71C67.204,339.608 66.377,337.59 64.901,336.093L13.732,284.191C10.63,281.045 5.565,281.009 2.418,284.111C0.894,285.614 0.035,287.666 0.035,289.808L0.035,341.71C0.035,346.128 3.617,349.71 8.035,349.71Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="95.39285"
|
||||
android:centerX="-268.79202"
|
||||
android:centerY="57.347355"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FF3D5AFE"/>
|
||||
<item android:offset="1" android:color="#FF651FFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</group>
|
||||
<group
|
||||
android:translateX="322.5263"
|
||||
android:translateY="285.5263">
|
||||
<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:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="236.10738"
|
||||
android:centerX="0"
|
||||
android:centerY="0"
|
||||
android:type="radial">
|
||||
<item
|
||||
android:offset="0"
|
||||
android:color="#FF3D5AFE" />
|
||||
<item
|
||||
android:offset="1"
|
||||
android:color="#FF651FFF" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M262.814,336.03L0.163,75.53L0.006,183.375C0.002,185.781 0.962,188.088 2.67,189.781L161.703,347.393C163.201,348.877 165.225,349.711 167.334,349.711L257.18,349.711C261.598,349.711 265.18,346.129 265.18,341.711C265.18,339.577 264.328,337.533 262.814,336.03Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="250.9684"
|
||||
android:centerX="-32.788143"
|
||||
android:centerY="67.34283"
|
||||
android:type="radial">
|
||||
<item
|
||||
android:offset="0"
|
||||
android:color="#FF3D5AFE" />
|
||||
<item
|
||||
android:offset="1"
|
||||
android:color="#FF651FFF" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M8.035,349.71L59.204,349.71C63.623,349.71 67.204,346.128 67.204,341.71C67.204,339.608 66.377,337.59 64.901,336.093L13.732,284.191C10.63,281.045 5.565,281.009 2.418,284.111C0.894,285.614 0.035,287.666 0.035,289.808L0.035,341.71C0.035,346.128 3.617,349.71 8.035,349.71Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="95.39285"
|
||||
android:centerX="-268.79202"
|
||||
android:centerY="57.347355"
|
||||
android:type="radial">
|
||||
<item
|
||||
android:offset="0"
|
||||
android:color="#FF3D5AFE" />
|
||||
<item
|
||||
android:offset="1"
|
||||
android:color="#FF651FFF" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</group>
|
||||
</vector>
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" 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 android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0"
|
||||
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>
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" 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 android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0"
|
||||
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>
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" 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 android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0"
|
||||
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>
|
||||
|
|
|
@ -4,52 +4,64 @@
|
|||
android:height="350dp"
|
||||
android:viewportWidth="276"
|
||||
android:viewportHeight="350">
|
||||
<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:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="236.10738"
|
||||
android:centerX="0"
|
||||
android:centerY="0"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FF3D5AFE"/>
|
||||
<item android:offset="1" android:color="#FF651FFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M262.814,336.03L0.163,75.53L0.006,183.375C0.002,185.781 0.962,188.088 2.67,189.781L161.703,347.393C163.201,348.877 165.225,349.711 167.334,349.711L257.18,349.711C261.598,349.711 265.18,346.129 265.18,341.711C265.18,339.577 264.328,337.533 262.814,336.03Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="250.9684"
|
||||
android:centerX="-32.788143"
|
||||
android:centerY="67.34283"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FF3D5AFE"/>
|
||||
<item android:offset="1" android:color="#FF651FFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M8.035,349.71L59.204,349.71C63.623,349.71 67.204,346.128 67.204,341.71C67.204,339.608 66.377,337.59 64.901,336.093L13.732,284.191C10.63,281.045 5.565,281.009 2.418,284.111C0.894,285.614 0.035,287.666 0.035,289.808L0.035,341.71C0.035,346.128 3.617,349.71 8.035,349.71Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="95.39285"
|
||||
android:centerX="-268.79202"
|
||||
android:centerY="57.347355"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FF3D5AFE"/>
|
||||
<item android:offset="1" android:color="#FF651FFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</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:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="236.10738"
|
||||
android:centerX="0"
|
||||
android:centerY="0"
|
||||
android:type="radial">
|
||||
<item
|
||||
android:offset="0"
|
||||
android:color="#FF3D5AFE" />
|
||||
<item
|
||||
android:offset="1"
|
||||
android:color="#FF651FFF" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M262.814,336.03L0.163,75.53L0.006,183.375C0.002,185.781 0.962,188.088 2.67,189.781L161.703,347.393C163.201,348.877 165.225,349.711 167.334,349.711L257.18,349.711C261.598,349.711 265.18,346.129 265.18,341.711C265.18,339.577 264.328,337.533 262.814,336.03Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="250.9684"
|
||||
android:centerX="-32.788143"
|
||||
android:centerY="67.34283"
|
||||
android:type="radial">
|
||||
<item
|
||||
android:offset="0"
|
||||
android:color="#FF3D5AFE" />
|
||||
<item
|
||||
android:offset="1"
|
||||
android:color="#FF651FFF" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M8.035,349.71L59.204,349.71C63.623,349.71 67.204,346.128 67.204,341.71C67.204,339.608 66.377,337.59 64.901,336.093L13.732,284.191C10.63,281.045 5.565,281.009 2.418,284.111C0.894,285.614 0.035,287.666 0.035,289.808L0.035,341.71C0.035,346.128 3.617,349.71 8.035,349.71Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="95.39285"
|
||||
android:centerX="-268.79202"
|
||||
android:centerY="57.347355"
|
||||
android:type="radial">
|
||||
<item
|
||||
android:offset="0"
|
||||
android:color="#FF3D5AFE" />
|
||||
<item
|
||||
android:offset="1"
|
||||
android:color="#FF651FFF" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</vector>
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:text="@tools:sample/full_names"
|
||||
tools:textColor="@color/md_black_1000" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
android:textStyle="bold"
|
||||
tools:text="@tools:sample/full_names"/>
|
||||
tools:text="@tools:sample/full_names" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text"
|
||||
|
@ -59,7 +59,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:singleLine="true"
|
||||
tools:text="@tools:sample/full_names"/>
|
||||
tools:text="@tools:sample/full_names" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
|
@ -5,16 +5,19 @@
|
|||
<style name="Theme.RetroMusic.Light" parent="Theme.RetroMusic.Base.Light">
|
||||
<item name="android:windowBackground">@color/window_color_light</item>
|
||||
<item name="android:scrollbars">none</item>
|
||||
<item name="dialogCornerRadius">16dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Black" parent="Theme.RetroMusic.Base.Black">
|
||||
<item name="android:windowBackground">@color/window_color_dark</item>
|
||||
<item name="android:scrollbars">none</item>
|
||||
<item name="dialogCornerRadius">16dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.FollowSystem" parent="Theme.RetroMusic.Base.Adaptive">
|
||||
<item name="android:windowBackground">@color/window_color</item>
|
||||
<item name="android:scrollbars">none</item>
|
||||
<item name="dialogCornerRadius">16dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Notification" parent="@android:style/TextAppearance.StatusBar.EventContent" />
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
android:layout="@layout/preference_category_title"
|
||||
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:entries="@array/pref_playlists_last_added_interval_titles"
|
||||
android:entryValues="@array/pref_playlists_last_added_interval_values"
|
||||
|
|
Loading…
Reference in a new issue