Add Android Navigation component

main
Hemanth S 2020-07-29 00:48:34 +05:30
parent d0b1d0083d
commit 7365e44803
62 changed files with 662 additions and 570 deletions

View File

@ -20,7 +20,6 @@ import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.VersionUtils
import code.name.monkey.retromusic.Constants.PRO_VERSION_PRODUCT_ID
import code.name.monkey.retromusic.appshortcuts.DynamicShortcutManager
import code.name.monkey.retromusic.providers.provideModules
import com.anjlab.android.iab.v3.BillingProcessor
import com.anjlab.android.iab.v3.TransactionDetails
import org.koin.android.ext.koin.androidContext

View File

@ -12,23 +12,22 @@ import android.view.SubMenu
import android.view.View
import androidx.core.app.ActivityCompat
import androidx.fragment.app.Fragment
import androidx.fragment.app.commit
import androidx.navigation.NavOptions
import code.name.monkey.appthemehelper.ThemeStore.Companion.accentColor
import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.appthemehelper.util.ATHUtil.resolveColor
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.*
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog.Companion.create
import code.name.monkey.retromusic.fragments.LibraryViewModel
import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog
import code.name.monkey.retromusic.extensions.navController
import code.name.monkey.retromusic.fragments.albums.AlbumsFragment
import code.name.monkey.retromusic.fragments.artists.ArtistsFragment
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
import code.name.monkey.retromusic.fragments.folder.FoldersFragment
import code.name.monkey.retromusic.fragments.genres.GenresFragment
import code.name.monkey.retromusic.fragments.folder.FoldersFragment.PATH
import code.name.monkey.retromusic.fragments.home.BannerHomeFragment
import code.name.monkey.retromusic.fragments.playlists.PlaylistsFragment
import code.name.monkey.retromusic.fragments.queue.PlayingQueueFragment
import code.name.monkey.retromusic.fragments.songs.SongsFragment
import code.name.monkey.retromusic.helper.MusicPlayerRemote.isPlaying
import code.name.monkey.retromusic.helper.MusicPlayerRemote.openAndShuffleQueue
@ -38,7 +37,6 @@ import code.name.monkey.retromusic.helper.MusicPlayerRemote.shuffleMode
import code.name.monkey.retromusic.helper.SearchQueryHelper.getSongs
import code.name.monkey.retromusic.helper.SortOrder.*
import code.name.monkey.retromusic.interfaces.CabHolder
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
import code.name.monkey.retromusic.loaders.AlbumLoader.getAlbum
import code.name.monkey.retromusic.loaders.ArtistLoader.getArtist
import code.name.monkey.retromusic.loaders.PlaylistSongsLoader.getPlaylistSongList
@ -63,7 +61,6 @@ import com.google.android.play.core.install.model.InstallStatus.INSTALLED
import com.google.android.play.core.install.model.UpdateAvailability
import com.google.android.play.core.tasks.Task
import kotlinx.android.synthetic.main.activity_main_content.*
import org.koin.android.ext.android.inject
import java.util.*
class MainActivity : AbsSlidingMusicPanelActivity(),
@ -74,10 +71,8 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
const val APP_UPDATE_REQUEST_CODE = 9002
}
private val libraryViewModel: LibraryViewModel by inject()
private var cab: MaterialCab? = null
private val intentFilter = IntentFilter(Intent.ACTION_SCREEN_OFF)
private lateinit var currentFragment: MainActivityFragmentCallbacks
private var appUpdateManager: AppUpdateManager? = null
private var blockRequestPermissions = false
private val listener = object : InstallStateUpdatedListener {
@ -123,22 +118,33 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
hideStatusBar()
setBottomBarVisibility(View.VISIBLE)
addMusicServiceEventListener(libraryViewModel)
if (savedInstanceState == null) {
selectedFragment(PreferenceUtil.lastPage)
} else {
restoreCurrentFragment()
}
appLaunched(this)
setupToolbar()
checkUpdate()
updateTabs()
getBottomNavigationView().selectedItemId = PreferenceUtil.lastPage
val navController = navController(R.id.fragment_container)
val navOptions: NavOptions = NavOptions.Builder()
.setLaunchSingleTop(true)
.setEnterAnim(R.anim.retro_fragment_open_enter)
.setExitAnim(R.anim.retro_fragment_open_exit)
.setPopEnterAnim(R.anim.retro_fragment_close_enter)
.setPopExitAnim(R.anim.retro_fragment_close_exit)
.setPopUpTo(navController.graph.startDestination, false)
.build()
getBottomNavigationView().setOnNavigationItemSelectedListener {
PreferenceUtil.lastPage = it.itemId
selectedFragment(it.itemId)
true
var handled = false
when (it.itemId) {
R.id.action_folder -> navController.navigate(it.itemId, Bundle().apply {
putSerializable(PATH, PreferenceUtil.startDirectory)
}, navOptions)
else -> if (navController.graph.findNode(it.itemId) != null) {
navController.navigate(it.itemId, null, navOptions)
handled = true;
}
}
return@setOnNavigationItemSelectedListener handled
}
}
@ -161,7 +167,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
}
try {
if (appUpdateInfo.updateAvailability() == UpdateAvailability.DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS) {
appUpdateManager!!.startUpdateFlowForResult(
appUpdateManager?.startUpdateFlowForResult(
appUpdateInfo,
AppUpdateType.IMMEDIATE,
this,
@ -238,20 +244,14 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
override fun onOptionsItemSelected(item: MenuItem): Boolean {
val fragment = getCurrentFragment()
if (fragment is AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>) {
if (handleGridSizeMenuItem(fragment, item)) {
return true
}
if (handleLayoutResType(fragment, item)) {
return true
}
if (handleSortOrderMenuItem(fragment, item)) {
return true
}
if (handleGridSizeMenuItem(fragment, item)) return true
if (handleLayoutResType(fragment, item)) return true
if (handleSortOrderMenuItem(fragment, item)) return true
}
when (item.itemId) {
R.id.action_search -> NavigationUtil.goToSearch(this)
R.id.action_new_playlist -> {
create().show(supportFragmentManager, "CREATE_PLAYLIST")
CreatePlaylistDialog.create().show(supportFragmentManager, "CREATE_PLAYLIST")
return true
}
R.id.action_mic -> {
@ -276,32 +276,26 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
): Boolean {
var sortOrder: String? = null
when (fragment) {
is AlbumsFragment -> {
when (item.itemId) {
R.id.action_album_sort_order_asc -> sortOrder = AlbumSortOrder.ALBUM_A_Z
R.id.action_album_sort_order_desc -> sortOrder = AlbumSortOrder.ALBUM_Z_A
R.id.action_album_sort_order_artist -> sortOrder = AlbumSortOrder.ALBUM_ARTIST
R.id.action_album_sort_order_year -> sortOrder = AlbumSortOrder.ALBUM_YEAR
}
is AlbumsFragment -> when (item.itemId) {
R.id.action_album_sort_order_asc -> sortOrder = AlbumSortOrder.ALBUM_A_Z
R.id.action_album_sort_order_desc -> sortOrder = AlbumSortOrder.ALBUM_Z_A
R.id.action_album_sort_order_artist -> sortOrder = AlbumSortOrder.ALBUM_ARTIST
R.id.action_album_sort_order_year -> sortOrder = AlbumSortOrder.ALBUM_YEAR
}
is ArtistsFragment -> {
when (item.itemId) {
R.id.action_artist_sort_order_asc -> sortOrder = ArtistSortOrder.ARTIST_A_Z
R.id.action_artist_sort_order_desc -> sortOrder = ArtistSortOrder.ARTIST_Z_A
}
is ArtistsFragment -> when (item.itemId) {
R.id.action_artist_sort_order_asc -> sortOrder = ArtistSortOrder.ARTIST_A_Z
R.id.action_artist_sort_order_desc -> sortOrder = ArtistSortOrder.ARTIST_Z_A
}
is SongsFragment -> {
when (item.itemId) {
R.id.action_song_sort_order_asc -> sortOrder = SongSortOrder.SONG_A_Z
R.id.action_song_sort_order_desc -> sortOrder = SongSortOrder.SONG_Z_A
R.id.action_song_sort_order_artist -> sortOrder = SongSortOrder.SONG_ARTIST
R.id.action_song_sort_order_album -> sortOrder = SongSortOrder.SONG_ALBUM
R.id.action_song_sort_order_year -> sortOrder = SongSortOrder.SONG_YEAR
R.id.action_song_sort_order_date -> sortOrder = SongSortOrder.SONG_DATE
R.id.action_song_sort_order_composer -> sortOrder = SongSortOrder.COMPOSER
R.id.action_song_sort_order_date_modified ->
sortOrder = SongSortOrder.SONG_DATE_MODIFIED
}
is SongsFragment -> when (item.itemId) {
R.id.action_song_sort_order_asc -> sortOrder = SongSortOrder.SONG_A_Z
R.id.action_song_sort_order_desc -> sortOrder = SongSortOrder.SONG_Z_A
R.id.action_song_sort_order_artist -> sortOrder = SongSortOrder.SONG_ARTIST
R.id.action_song_sort_order_album -> sortOrder = SongSortOrder.SONG_ALBUM
R.id.action_song_sort_order_year -> sortOrder = SongSortOrder.SONG_YEAR
R.id.action_song_sort_order_date -> sortOrder = SongSortOrder.SONG_DATE
R.id.action_song_sort_order_composer -> sortOrder = SongSortOrder.COMPOSER
R.id.action_song_sort_order_date_modified ->
sortOrder = SongSortOrder.SONG_DATE_MODIFIED
}
}
@ -617,70 +611,6 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
snackBar.show()
}
private fun setCurrentFragment(
fragment: Fragment,
tag: String
) {
supportFragmentManager.commit {
setCustomAnimations(
R.anim.retro_fragment_open_enter,
R.anim.retro_fragment_open_exit,
R.anim.retro_fragment_fade_enter,
R.anim.retro_fragment_fade_exit
)
replace(R.id.fragment_container, fragment, tag)
}
currentFragment = fragment as MainActivityFragmentCallbacks
}
private fun selectedFragment(itemId: Int) {
when (itemId) {
R.id.action_album -> setCurrentFragment(
AlbumsFragment.newInstance(),
AlbumsFragment.TAG
)
R.id.action_artist -> setCurrentFragment(
ArtistsFragment.newInstance(),
ArtistsFragment.TAG
)
R.id.action_playlist -> setCurrentFragment(
PlaylistsFragment.newInstance(),
PlaylistsFragment.TAG
)
R.id.action_genre -> setCurrentFragment(
GenresFragment.newInstance(),
GenresFragment.TAG
)
R.id.action_playing_queue -> setCurrentFragment(
PlayingQueueFragment.newInstance(),
PlayingQueueFragment.TAG
)
R.id.action_song -> setCurrentFragment(
SongsFragment.newInstance(),
SongsFragment.TAG
)
R.id.action_folder -> setCurrentFragment(
FoldersFragment.newInstance(this),
FoldersFragment.TAG
)
R.id.action_home -> setCurrentFragment(
BannerHomeFragment.newInstance(),
BannerHomeFragment.TAG
)
else -> setCurrentFragment(
BannerHomeFragment.newInstance(),
BannerHomeFragment.TAG
)
}
}
private fun restoreCurrentFragment() {
val fragment = supportFragmentManager.findFragmentById(R.id.fragment_container)
if (fragment != null) {
currentFragment = fragment as MainActivityFragmentCallbacks
}
}
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
if (key == GENERAL_THEME || key == BLACK_THEME || key == ADAPTIVE_COLOR_APP || key == USER_NAME || key == TOGGLE_FULL_SCREEN || key == TOGGLE_VOLUME || key == ROUND_CORNERS || key == CAROUSEL_EFFECT || key == NOW_PLAYING_SCREEN_ID || key == TOGGLE_GENRE || key == BANNER_IMAGE_PATH || key == PROFILE_IMAGE_PATH || key == CIRCULAR_ALBUM_ART || key == KEEP_SCREEN_ON || key == TOGGLE_SEPARATE_LINE || key == TOGGLE_HOME_BANNER || key == TOGGLE_ADD_CONTROLS || key == ALBUM_COVER_STYLE || key == HOME_ARTIST_GRID_STYLE || key == ALBUM_COVER_TRANSFORM || key == DESATURATED_COLOR || key == EXTRA_SONG_INFO || key == TAB_TEXT_MODE || key == LANGUAGE_NAME || key == LIBRARY_CATEGORIES
) {
@ -766,7 +696,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
cab?.finish()
return true
}
return super.handleBackPress() || currentFragment.handleBackPress()
return super.handleBackPress()
}
override fun openCab(menuRes: Int, callback: MaterialCab.Callback): MaterialCab {

View File

@ -4,6 +4,9 @@ import android.os.Bundle
import android.view.MenuItem
import androidx.annotation.StringRes
import androidx.fragment.app.Fragment
import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.AppBarConfiguration
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.VersionUtils
import code.name.monkey.retromusic.R
@ -16,6 +19,8 @@ import kotlinx.android.synthetic.main.activity_settings.*
class SettingsActivity : AbsBaseActivity(), ColorChooserDialog.ColorCallback {
private val fragmentManager = supportFragmentManager
private lateinit var appBarConfiguration: AppBarConfiguration
private lateinit var navController: NavController
override fun onCreate(savedInstanceState: Bundle?) {
setDrawUnderStatusBar()
@ -30,6 +35,19 @@ class SettingsActivity : AbsBaseActivity(), ColorChooserDialog.ColorCallback {
private fun setupToolbar() {
setTitle(R.string.action_settings)
applyToolbar(toolbar)
val navHostFragment = supportFragmentManager.findFragmentById(R.id.contentFrame) as NavHostFragment
val navController: NavController = navHostFragment.navController
navController.addOnDestinationChangedListener { _, _, _ ->
toolbar.title = navController.currentDestination?.label
}
//It removes the back button
//appBarConfiguration = AppBarConfiguration(navController.graph)
//setupActionBarWithNavController(navController, appBarConfiguration)
}
override fun onSupportNavigateUp(): Boolean {
return navController.navigateUp() || super.onSupportNavigateUp()
}
fun setupFragment(fragment: Fragment, @StringRes titleName: Int) {

View File

@ -41,7 +41,7 @@ import com.afollestad.materialcab.MaterialCab
import com.bumptech.glide.Glide
import kotlinx.android.synthetic.main.activity_album.*
import kotlinx.android.synthetic.main.activity_album_content.*
import org.koin.android.viewmodel.ext.android.viewModel
import org.koin.androidx.viewmodel.ext.android.viewModel
import org.koin.core.parameter.parametersOf
import java.util.*
import android.util.Pair as UtilPair
@ -66,7 +66,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), CabHolder {
return cab as MaterialCab
}
private val detailsViewModel: AlbumDetailsViewModel by viewModel {
private val detailsViewModel by viewModel<AlbumDetailsViewModel> {
parametersOf(extraNotNull<Int>(EXTRA_ALBUM_ID).value)
}
private lateinit var simpleSongAdapter: SimpleSongAdapter

View File

@ -39,7 +39,7 @@ import com.afollestad.materialcab.MaterialCab
import com.bumptech.glide.Glide
import kotlinx.android.synthetic.main.activity_artist_content.*
import kotlinx.android.synthetic.main.activity_artist_details.*
import org.koin.android.viewmodel.ext.android.viewModel
import org.koin.androidx.viewmodel.ext.android.viewModel
import org.koin.core.parameter.parametersOf
import java.util.*
import kotlin.collections.ArrayList

View File

@ -1,6 +1,5 @@
package code.name.monkey.retromusic.activities.base
import android.animation.ValueAnimator
import android.graphics.Color
import android.os.Bundle
import android.view.View
@ -8,61 +7,41 @@ import android.view.ViewGroup
import android.view.ViewTreeObserver
import android.widget.FrameLayout
import androidx.annotation.LayoutRes
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.RetroBottomSheetBehavior
import code.name.monkey.retromusic.extensions.hide
import code.name.monkey.retromusic.extensions.show
import code.name.monkey.retromusic.fragments.LibraryViewModel
import code.name.monkey.retromusic.fragments.MiniPlayerFragment
import code.name.monkey.retromusic.fragments.NowPlayingScreen
import code.name.monkey.retromusic.fragments.NowPlayingScreen.*
import code.name.monkey.retromusic.fragments.base.AbsPlayerFragment
import code.name.monkey.retromusic.fragments.player.adaptive.AdaptiveFragment
import code.name.monkey.retromusic.fragments.player.blur.BlurPlayerFragment
import code.name.monkey.retromusic.fragments.player.card.CardFragment
import code.name.monkey.retromusic.fragments.player.cardblur.CardBlurFragment
import code.name.monkey.retromusic.fragments.player.circle.CirclePlayerFragment
import code.name.monkey.retromusic.fragments.player.classic.ClassicPlayerFragment
import code.name.monkey.retromusic.fragments.player.color.ColorFragment
import code.name.monkey.retromusic.fragments.player.fit.FitFragment
import code.name.monkey.retromusic.fragments.player.flat.FlatPlayerFragment
import code.name.monkey.retromusic.fragments.player.full.FullPlayerFragment
import code.name.monkey.retromusic.fragments.player.gradient.GradientPlayerFragment
import code.name.monkey.retromusic.fragments.player.material.MaterialFragment
import code.name.monkey.retromusic.fragments.player.normal.PlayerFragment
import code.name.monkey.retromusic.fragments.player.peak.PeakPlayerFragment
import code.name.monkey.retromusic.fragments.player.plain.PlainPlayerFragment
import code.name.monkey.retromusic.fragments.player.simple.SimplePlayerFragment
import code.name.monkey.retromusic.fragments.player.tiny.TinyPlayerFragment
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.model.CategoryInfo
import code.name.monkey.retromusic.util.DensityUtil
import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.views.BottomNavigationBarTinted
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.shape.MaterialShapeDrawable
import com.google.android.material.shape.ShapeAppearanceModel
import kotlinx.android.synthetic.main.sliding_music_panel_layout.*
import org.koin.androidx.viewmodel.ext.android.viewModel
abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
AbsPlayerFragment.Callbacks {
abstract class AbsSlidingMusicPanelActivity() : AbsMusicServiceActivity() {
companion object {
val TAG: String = AbsSlidingMusicPanelActivity::class.java.simpleName
}
private val libraryViewModel by viewModel<LibraryViewModel>()
private lateinit var behavior: RetroBottomSheetBehavior<FrameLayout>
private var miniPlayerFragment: MiniPlayerFragment? = null
private var playerFragment: AbsPlayerFragment? = null
private var cps: NowPlayingScreen? = null
private var navigationBarColor: Int = 0
private var taskColor: Int = 0
private var lightStatusBar: Boolean = false
private var lightNavigationBar: Boolean = false
private var navigationBarColorAnimator: ValueAnimator? = null
private var paletteColor: Int = Color.WHITE
protected abstract fun createContentView(): View
private lateinit var shapeDrawable: MaterialShapeDrawable
private val panelState: Int
get() = behavior.state
@ -72,7 +51,6 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
setMiniPlayerAlphaProgress(slideOffset)
dimBackground.show()
dimBackground.alpha = slideOffset
shapeDrawable.interpolation = 1 - slideOffset
}
override fun onStateChanged(bottomSheet: View, newState: Int) {
@ -91,35 +69,29 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
}
}
fun getBottomSheetBehavior() = behavior
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(createContentView())
chooseFragmentForTheme()
setupSlidingUpPanel()
addMusicServiceEventListener(libraryViewModel)
behavior = BottomSheetBehavior.from(slidingPanel) as RetroBottomSheetBehavior
setupBottomSheet()
val themeColor = ATHUtil.resolveColor(this, android.R.attr.windowBackground, Color.GRAY)
dimBackground.setBackgroundColor(ColorUtil.withAlpha(themeColor, 0.5f))
shapeDrawable = MaterialShapeDrawable(
ShapeAppearanceModel.builder(
this,
R.style.ClassicThemeOverLay,
0
).build()
)
slidingPanel.background = shapeDrawable
libraryViewModel.paletteColorLiveData.observe(this, Observer {
this.paletteColor = it
onPaletteColorChanged()
})
}
override fun onResume() {
super.onResume()
if (cps != PreferenceUtil.nowPlayingScreen) {
postRecreate()
}
fun getBottomSheetBehavior() = behavior
private fun setupBottomSheet() {
behavior = BottomSheetBehavior.from(slidingPanel) as RetroBottomSheetBehavior
behavior.addBottomSheetCallback(bottomSheetCallbackList)
if (behavior.state == BottomSheetBehavior.STATE_EXPANDED) {
@ -127,17 +99,23 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
}
}
override fun onResume() {
super.onResume()
if (cps != PreferenceUtil.nowPlayingScreen) {
postRecreate()
}
}
override fun onDestroy() {
super.onDestroy()
behavior.removeBottomSheetCallback(bottomSheetCallbackList)
if (navigationBarColorAnimator != null) navigationBarColorAnimator?.cancel() // just in case
}
protected fun wrapSlidingMusicPanel(@LayoutRes resId: Int): View {
val slidingMusicPanelLayout =
layoutInflater.inflate(R.layout.sliding_music_panel_layout, null)
val contentContainer =
slidingMusicPanelLayout.findViewById<ViewGroup>(R.id.mainContentFrame)
val contentContainer: ViewGroup =
slidingMusicPanelLayout.findViewById(R.id.mainContentFrame)
layoutInflater.inflate(resId, contentContainer)
return slidingMusicPanelLayout
}
@ -159,7 +137,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
miniPlayerFragment?.view?.visibility = if (alpha == 0f) View.GONE else View.VISIBLE
bottomNavigationView.translationY = progress * 500
//bottomNavigationView.alpha = alpha
bottomNavigationView.alpha = alpha
}
open fun onPanelCollapsed() {
@ -168,20 +146,9 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
super.setTaskDescriptionColor(taskColor)
super.setNavigationbarColor(navigationBarColor)
super.setLightNavigationBar(lightNavigationBar)
playerFragment?.setMenuVisibility(false)
playerFragment?.userVisibleHint = false
playerFragment?.onHide()
}
open fun onPanelExpanded() {
val playerFragmentColor = playerFragment!!.paletteColor
super.setTaskDescriptionColor(playerFragmentColor)
playerFragment?.setMenuVisibility(true)
playerFragment?.userVisibleHint = true
playerFragment?.onShow()
onPaletteColorChanged()
}
@ -190,15 +157,12 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
ViewTreeObserver.OnGlobalLayoutListener {
override fun onGlobalLayout() {
slidingPanel.viewTreeObserver.removeOnGlobalLayoutListener(this)
if (cps != Peak) {
val params = slidingPanel.layoutParams as ViewGroup.LayoutParams
params.height = ViewGroup.LayoutParams.MATCH_PARENT
slidingPanel.layoutParams = params
}
when (panelState) {
BottomSheetBehavior.STATE_EXPANDED -> onPanelExpanded()
BottomSheetBehavior.STATE_COLLAPSED -> onPanelCollapsed()
else -> playerFragment!!.onHide()
else -> {
//playerFragment!!.onHide()
}
}
}
})
@ -240,33 +204,6 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
private fun chooseFragmentForTheme() {
cps = PreferenceUtil.nowPlayingScreen
val fragment: Fragment = when (cps) {
Blur -> BlurPlayerFragment()
Adaptive -> AdaptiveFragment()
Normal -> PlayerFragment()
Card -> CardFragment()
BlurCard -> CardBlurFragment()
Fit -> FitFragment()
Flat -> FlatPlayerFragment()
Full -> FullPlayerFragment()
Plain -> PlainPlayerFragment()
Simple -> SimplePlayerFragment()
Material -> MaterialFragment()
Color -> ColorFragment()
Tiny -> TinyPlayerFragment()
Peak -> PeakPlayerFragment()
Circle -> CirclePlayerFragment()
Classic -> ClassicPlayerFragment()
Gradient -> GradientPlayerFragment()
else -> PlayerFragment()
} // must implement AbsPlayerFragment
supportFragmentManager.beginTransaction()
.replace(R.id.playerFragmentContainer, fragment)
.commit()
supportFragmentManager.executePendingTransactions()
playerFragment =
supportFragmentManager.findFragmentById(R.id.playerFragmentContainer) as AbsPlayerFragment
miniPlayerFragment =
supportFragmentManager.findFragmentById(R.id.miniPlayerFragment) as MiniPlayerFragment
miniPlayerFragment?.view?.setOnClickListener { expandPanel() }
@ -295,7 +232,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
}
open fun handleBackPress(): Boolean {
if (behavior.peekHeight != 0 && playerFragment!!.onBackPressed()) return true
if (panelState == BottomSheetBehavior.STATE_EXPANDED) {
collapsePanel()
return true
@ -303,13 +240,10 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
return false
}
override fun onPaletteColorChanged() {
private fun onPaletteColorChanged() {
if (panelState == BottomSheetBehavior.STATE_EXPANDED) {
val paletteColor = playerFragment!!.paletteColor
super.setTaskDescriptionColor(paletteColor)
val isColorLight = ColorUtil.isColorLight(paletteColor)
if (PreferenceUtil.isAdaptiveColor && (cps == Normal || cps == Flat)) {
super.setLightNavigationBar(true)
super.setLightStatusbar(isColorLight)
@ -360,7 +294,6 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
override fun setNavigationbarColor(color: Int) {
navigationBarColor = color
if (panelState == BottomSheetBehavior.STATE_COLLAPSED) {
if (navigationBarColorAnimator != null) navigationBarColorAnimator!!.cancel()
super.setNavigationbarColor(color)
}
}

View File

@ -21,7 +21,7 @@ import code.name.monkey.retromusic.util.DensityUtil
import code.name.monkey.retromusic.util.RetroColorUtil
import com.afollestad.materialcab.MaterialCab
import kotlinx.android.synthetic.main.activity_playlist_detail.*
import org.koin.android.viewmodel.ext.android.viewModel
import org.koin.androidx.viewmodel.ext.android.viewModel
import org.koin.core.parameter.parametersOf
import java.util.*

View File

@ -28,7 +28,7 @@ import com.h6ah4i.android.widget.advrecyclerview.animator.RefactoredDefaultItemA
import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager
import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils
import kotlinx.android.synthetic.main.activity_playlist_detail.*
import org.koin.android.viewmodel.ext.android.viewModel
import org.koin.androidx.viewmodel.ext.android.viewModel
import org.koin.core.parameter.parametersOf
class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder {

View File

@ -116,7 +116,7 @@ class AlbumCoverPagerAdapter(
private fun getLayoutWithPlayerTheme(): Int {
return when (PreferenceUtil.nowPlayingScreen) {
Card, Peak, Fit, Tiny, Classic, Gradient, Full -> R.layout.fragment_album_full_cover
Card, Fit, Tiny, Classic, Gradient, Full -> R.layout.fragment_album_full_cover
else -> {
if (PreferenceUtil.isCarouselEffect) {
R.layout.fragment_album_carousel_cover

View File

@ -0,0 +1,20 @@
package code.name.monkey.retromusic.extensions
import androidx.annotation.IdRes
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.fragment.findNavController
fun Fragment.navigate(@IdRes id: Int) = findNavController().navigate(id)
fun Fragment.navController(@IdRes id: Int): NavController {
val fragment = childFragmentManager.findFragmentById(id) as NavHostFragment
return fragment.navController
}
fun AppCompatActivity.navController(@IdRes id: Int): NavController {
val fragment = supportFragmentManager.findFragmentById(id) as NavHostFragment
return fragment.navController
}

View File

@ -18,21 +18,21 @@ class LibraryViewModel(
private val repository: RepositoryImpl
) : ViewModel(), MusicServiceEventListener {
private val _albums = MutableLiveData<List<Album>>()
private val _songs = MutableLiveData<List<Song>>()
private val _artists = MutableLiveData<List<Artist>>()
private val _playlist = MutableLiveData<List<Playlist>>()
private val _genre = MutableLiveData<List<Genre>>()
private val _homeSections = MutableLiveData<List<Home>>()
private val _paletteColor = MutableLiveData<Int>()
private val albums = MutableLiveData<List<Album>>()
private val songs = MutableLiveData<List<Song>>()
private val artists = MutableLiveData<List<Artist>>()
private val playlists = MutableLiveData<List<Playlist>>()
private val genres = MutableLiveData<List<Genre>>()
private val home = MutableLiveData<List<Home>>()
private val paletteColor = MutableLiveData<Int>()
val paletteColor: LiveData<Int> = _paletteColor
val homeSections: LiveData<List<Home>> = _homeSections
val allAlbums: LiveData<List<Album>> = _albums
val allSongs: LiveData<List<Song>> = _songs
val allArtists: LiveData<List<Artist>> = _artists
val allPlaylisits: LiveData<List<Playlist>> = _playlist
val allGenres: LiveData<List<Genre>> = _genre
val paletteColorLiveData: LiveData<Int> = paletteColor
val homeLiveData: LiveData<List<Home>> = home
val albumsLiveData: LiveData<List<Album>> = albums
val songsLiveData: LiveData<List<Song>> = songs
val artistsLiveData: LiveData<List<Artist>> = artists
val playlisitsLiveData: LiveData<List<Playlist>> = playlists
val genresLiveData: LiveData<List<Genre>> = genres
init {
viewModelScope.launch {
@ -41,11 +41,11 @@ class LibraryViewModel(
}
private fun loadLibraryContent() = viewModelScope.launch {
_songs.value = loadSongs.await()
_albums.value = loadAlbums.await()
_artists.value = loadArtists.await()
_playlist.value = loadPlaylists.await()
_genre.value = loadGenres.await()
songs.value = loadSongs.await()
albums.value = loadAlbums.await()
artists.value = loadArtists.await()
playlists.value = loadPlaylists.await()
genres.value = loadGenres.await()
loadHomeSections()
}
@ -71,7 +71,7 @@ class LibraryViewModel(
}
}
}
_homeSections.value = list
home.value = list
}
private val loadSongs: Deferred<List<Song>>
@ -101,13 +101,17 @@ class LibraryViewModel(
fun forceReload(reloadType: ReloadType) = viewModelScope.launch {
when (reloadType) {
Songs -> _songs.value = loadSongs.await()
Albums -> _albums.value = loadAlbums.await()
Artists -> _artists.value = loadArtists.await()
HomeSections -> _songs.value = loadSongs.await()
Songs -> songs.value = loadSongs.await()
Albums -> albums.value = loadAlbums.await()
Artists -> artists.value = loadArtists.await()
HomeSections -> songs.value = loadSongs.await()
}
}
fun updateColor(newColor: Int) {
paletteColor.postValue(newColor)
}
override fun onMediaStoreChanged() {
loadLibraryContent()
}
@ -119,6 +123,7 @@ class LibraryViewModel(
override fun onPlayStateChanged() {}
override fun onRepeatModeChanged() {}
override fun onShuffleModeChanged() {}
}
enum class ReloadType {

View File

@ -24,7 +24,7 @@ enum class NowPlayingScreen constructor(
Gradient(R.string.gradient, R.drawable.np_gradient, 17),
Material(R.string.material, R.drawable.np_material, 11),
Normal(R.string.normal, R.drawable.np_normal, 0),
Peak(R.string.peak, R.drawable.np_peak, 14),
//Peak(R.string.peak, R.drawable.np_peak, 14),
Plain(R.string.plain, R.drawable.np_plain, 3),
Simple(R.string.simple, R.drawable.np_simple, 8),
Tiny(R.string.tiny, R.drawable.np_tiny, 7),

View File

@ -11,7 +11,7 @@ import code.name.monkey.retromusic.fragments.ReloadType
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
import code.name.monkey.retromusic.util.PreferenceUtil
import org.koin.android.viewmodel.ext.android.sharedViewModel
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
class AlbumsFragment :
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridLayoutManager>(),
@ -21,7 +21,7 @@ class AlbumsFragment :
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
libraryViewModel.allAlbums
libraryViewModel.albumsLiveData
.observe(viewLifecycleOwner, Observer { albums ->
if (albums.isNotEmpty())
adapter?.swapDataSet(albums)

View File

@ -11,7 +11,7 @@ import code.name.monkey.retromusic.fragments.ReloadType
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
import code.name.monkey.retromusic.util.PreferenceUtil
import org.koin.android.viewmodel.ext.android.sharedViewModel
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
class ArtistsFragment :
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<ArtistAdapter, GridLayoutManager>(),
@ -21,7 +21,7 @@ class ArtistsFragment :
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
libraryViewModel.allArtists
libraryViewModel.artistsLiveData
.observe(viewLifecycleOwner, Observer { artists ->
if (artists.isNotEmpty()) {
adapter?.swapDataSet(artists)

View File

@ -2,7 +2,6 @@ package code.name.monkey.retromusic.fragments.base
import android.annotation.SuppressLint
import android.content.ContentUris
import android.content.Context
import android.content.Intent
import android.media.MediaMetadataRetriever
import android.os.AsyncTask
@ -19,6 +18,7 @@ import code.name.monkey.retromusic.activities.tageditor.AbsTagEditorActivity
import code.name.monkey.retromusic.activities.tageditor.SongTagEditorActivity
import code.name.monkey.retromusic.dialogs.*
import code.name.monkey.retromusic.extensions.hide
import code.name.monkey.retromusic.fragments.LibraryViewModel
import code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.interfaces.PaletteColorHolder
@ -26,6 +26,7 @@ import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.model.lyrics.Lyrics
import code.name.monkey.retromusic.util.*
import kotlinx.android.synthetic.main.shadow_statusbar_toolbar.*
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
import java.io.FileNotFoundException
abstract class AbsPlayerFragment : AbsMusicServiceFragment(),
@ -33,27 +34,11 @@ abstract class AbsPlayerFragment : AbsMusicServiceFragment(),
PaletteColorHolder,
PlayerAlbumCoverFragment.Callbacks {
var callbacks: Callbacks? = null
private set
private var updateIsFavoriteTask: AsyncTask<*, *, *>? = null
private var updateLyricsAsyncTask: AsyncTask<*, *, *>? = null
private var playerAlbumCoverFragment: PlayerAlbumCoverFragment? = null
override fun onAttach(
context: Context
) {
super.onAttach(context)
try {
callbacks = context as Callbacks?
} catch (e: ClassCastException) {
throw RuntimeException(context.javaClass.simpleName + " must implement " + Callbacks::class.java.simpleName)
}
}
override fun onDetach() {
super.onDetach()
callbacks = null
}
protected val libraryViewModel by sharedViewModel<LibraryViewModel>()
override fun onMenuItemClick(
item: MenuItem

View File

@ -84,7 +84,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
FileUtil.fileIsMimeType(file, "audio/*", MimeTypeMap.getSingleton()) ||
FileUtil.fileIsMimeType(file, "application/opus", MimeTypeMap.getSingleton()) ||
FileUtil.fileIsMimeType(file, "application/ogg", MimeTypeMap.getSingleton()));
private static final String PATH = "path";
public static final String PATH = "path";
private static final String CRUMBS = "crumbs";
private static final int LOADER_ID = 5;
private SongFileAdapter adapter;
@ -170,8 +170,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
if (savedInstanceState == null) {
//noinspection ConstantConditions
setCrumb(new BreadCrumbLayout.Crumb(
FileUtil.safeGetCanonicalFile((File) getArguments().getSerializable(PATH))), true);
setCrumb(new BreadCrumbLayout.Crumb(FileUtil.safeGetCanonicalFile((File) requireArguments().getSerializable(PATH))), true);
} else {
breadCrumbs.restoreFromStateWrapper(savedInstanceState.getParcelable(CRUMBS));
getLoaderManager().initLoader(LOADER_ID, null, this);

View File

@ -23,7 +23,7 @@ import code.name.monkey.retromusic.adapter.GenreAdapter
import code.name.monkey.retromusic.fragments.LibraryViewModel
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewFragment
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
import org.koin.android.viewmodel.ext.android.sharedViewModel
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
class GenresFragment : AbsLibraryPagerRecyclerViewFragment<GenreAdapter, LinearLayoutManager>(),
MainActivityFragmentCallbacks {
@ -32,7 +32,7 @@ class GenresFragment : AbsLibraryPagerRecyclerViewFragment<GenreAdapter, LinearL
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
libraryViewModel.allGenres
libraryViewModel.genresLiveData
.observe(viewLifecycleOwner, Observer { genres ->
if (genres.isNotEmpty()) {
adapter?.swapDataSet(genres)

View File

@ -40,7 +40,7 @@ import com.bumptech.glide.Glide
import kotlinx.android.synthetic.main.abs_playlists.*
import kotlinx.android.synthetic.main.fragment_banner_home.*
import kotlinx.android.synthetic.main.home_content.*
import org.koin.android.viewmodel.ext.android.sharedViewModel
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallbacks {
@ -116,7 +116,7 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
adapter = homeAdapter
}
libraryViewModel.homeSections
libraryViewModel.homeLiveData
.observe(viewLifecycleOwner, Observer { sections ->
homeAdapter.swapData(sections)
})

View File

@ -1,16 +0,0 @@
package code.name.monkey.retromusic.fragments.player
import android.os.Bundle
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.util.PreferenceUtil
class MainPlayerFragment : Fragment(R.layout.fragment_main_player) {
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
when (PreferenceUtil.nowPlayingScreen) {
else -> findNavController().navigate(R.id.action_mainPlayerFragment_to_adaptiveFragment)
}
}
}

View File

@ -0,0 +1,45 @@
package code.name.monkey.retromusic.fragments.player
import android.os.Bundle
import android.util.Log
import androidx.fragment.app.Fragment
import androidx.navigation.NavController
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.extensions.navController
import code.name.monkey.retromusic.fragments.NowPlayingScreen.*
import code.name.monkey.retromusic.util.PreferenceUtil
class NowPlayingPlayerFragment : Fragment(R.layout.fragment_now_playing_player) {
companion object {
const val TAG = "NowPlaying"
}
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
Log.i(TAG, "onActivityCreated: ")
val navController = navController(R.id.playerFragmentContainer)
updateNowPlaying(navController)
}
private fun updateNowPlaying(navController: NavController) {
Log.i(TAG, "updateNowPlaying: ${PreferenceUtil.nowPlayingScreen}")
when (PreferenceUtil.nowPlayingScreen) {
Adaptive -> navController.navigate(R.id.adaptiveFragment)
Blur -> navController.navigate(R.id.blurPlayerFragment)
BlurCard -> navController.navigate(R.id.cardBlurFragment)
Card -> navController.navigate(R.id.cardFragment)
Circle -> navController.navigate(R.id.circlePlayerFragment)
Classic -> navController.navigate(R.id.classicPlayerFragment)
Color -> navController.navigate(R.id.colorFragment)
Fit -> navController.navigate(R.id.fitFragment)
Flat -> navController.navigate(R.id.flatPlayerFragment)
Full -> navController.navigate(R.id.fullPlayerFragment)
Gradient -> navController.navigate(R.id.gradientPlayerFragment)
Material -> navController.navigate(R.id.materialFragment)
Plain -> navController.navigate(R.id.plainPlayerFragment)
Simple -> navController.navigate(R.id.simplePlayerFragment)
Tiny -> navController.navigate(R.id.tinyPlayerFragment)
else -> navController.navigate(R.id.playerFragment)
}
}
}

View File

@ -50,7 +50,7 @@ class PlayerAlbumCoverFragment : AbsMusicServiceFragment(), ViewPager.OnPageChan
val metrics = resources.displayMetrics
val ratio = metrics.heightPixels.toFloat() / metrics.widthPixels.toFloat()
if (nps == Full || nps == Classic || nps == Fit || nps == Gradient || nps == Peak) {
if (nps == Full || nps == Classic || nps == Fit || nps == Gradient ) {
viewPager.offscreenPageLimit = 2
} else if (PreferenceUtil.isCarouselEffect) {
viewPager.clipToPadding = false

View File

@ -96,7 +96,7 @@ class AdaptiveFragment : AbsPlayerFragment() {
override fun onColorChanged(color: MediaNotificationProcessor) {
playbackControlsFragment.setColor(color)
lastColor = color.primaryTextColor
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.primaryTextColor)
ToolbarContentTintHelper.colorizeToolbar(
playerToolbar,
ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal),

View File

@ -68,7 +68,7 @@ class BlurPlayerFragment : AbsPlayerFragment(), SharedPreferences.OnSharedPrefer
override fun onColorChanged(color: MediaNotificationProcessor) {
playbackControlsFragment.setColor(color)
lastColor = color.backgroundColor
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.backgroundColor)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, Color.WHITE, activity)
}

View File

@ -47,7 +47,7 @@ class CardFragment : AbsPlayerFragment() {
override fun onColorChanged(color: MediaNotificationProcessor) {
playbackControlsFragment.setColor(color)
lastColor = color.primaryTextColor
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.primaryTextColor)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, Color.WHITE, activity)
}

View File

@ -54,7 +54,7 @@ class CardBlurFragment : AbsPlayerFragment(), SharedPreferences.OnSharedPreferen
override fun onColorChanged(color: MediaNotificationProcessor) {
playbackControlsFragment.setColor(color)
lastColor = color.backgroundColor
callbacks!!.onPaletteColorChanged()
libraryViewModel.updateColor(color.backgroundColor)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, Color.WHITE, activity)
playerToolbar.setTitleTextColor(Color.WHITE)

View File

@ -271,7 +271,7 @@ class ClassicPlayerFragment : AbsPlayerFragment(), View.OnLayoutChangeListener,
override fun onColorChanged(color: MediaNotificationProcessor) {
lastColor = color.backgroundColor
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.backgroundColor)
lastPlaybackControlsColor = color.primaryTextColor
lastDisabledPlaybackControlsColor = ColorUtil.withAlpha(color.primaryTextColor, 0.3f)

View File

@ -33,10 +33,11 @@ class ColorFragment : AbsPlayerFragment() {
get() = navigationColor
override fun onColorChanged(color: MediaNotificationProcessor) {
libraryViewModel.updateColor(color.backgroundColor)
lastColor = color.secondaryTextColor
playbackControlsFragment.setColor(color)
navigationColor = color.backgroundColor
callbacks?.onPaletteColorChanged()
colorGradientBackground?.setBackgroundColor(color.backgroundColor)
playerActivity?.setLightNavigationBar(ColorUtil.isColorLight(color.backgroundColor))
Handler().post {

View File

@ -46,7 +46,7 @@ class FitFragment : AbsPlayerFragment() {
override fun onColorChanged(color: MediaNotificationProcessor) {
playbackControlsFragment.setColor(color)
lastColor = color.primaryTextColor
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.primaryTextColor)
ToolbarContentTintHelper.colorizeToolbar(
playerToolbar,
ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal),

View File

@ -86,14 +86,14 @@ class FlatPlaybackControlsFragment : AbsPlayerControlsFragment(), Callback {
override fun setColor(color: MediaNotificationProcessor) {
if (ATHUtil.isWindowBackgroundDark(requireContext())) {
lastPlaybackControlsColor =
MaterialValueHelper.getSecondaryTextColor(requireContext(), true)
MaterialValueHelper.getSecondaryTextColor(requireContext(), false)
lastDisabledPlaybackControlsColor =
MaterialValueHelper.getSecondaryDisabledTextColor(requireContext(), true)
MaterialValueHelper.getSecondaryDisabledTextColor(requireContext(), false)
} else {
lastPlaybackControlsColor =
MaterialValueHelper.getPrimaryTextColor(requireContext(), false)
MaterialValueHelper.getPrimaryTextColor(requireContext(), true)
lastDisabledPlaybackControlsColor =
MaterialValueHelper.getPrimaryDisabledTextColor(requireContext(), false)
MaterialValueHelper.getPrimaryDisabledTextColor(requireContext(), true)
}
val colorFinal = if (PreferenceUtil.isAdaptiveColor) {
@ -116,8 +116,8 @@ class FlatPlaybackControlsFragment : AbsPlayerControlsFragment(), Callback {
val colorSecondary =
MaterialValueHelper.getSecondaryTextColor(context, ColorUtil.isColorLight(darkColor))
TintHelper.setTintAuto(playPauseButton!!, colorPrimary, false)
TintHelper.setTintAuto(playPauseButton!!, color, true)
TintHelper.setTintAuto(playPauseButton, colorPrimary, false)
TintHelper.setTintAuto(playPauseButton, color, true)
title.setBackgroundColor(color)
title.setTextColor(colorPrimary)

View File

@ -108,7 +108,7 @@ class FlatPlayerFragment : AbsPlayerFragment() {
override fun onColorChanged(color: MediaNotificationProcessor) {
lastColor = color.backgroundColor
controlsFragment.setColor(color)
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.backgroundColor)
val isLight = ColorUtil.isColorLight(color.backgroundColor)
val iconColor = if (PreferenceUtil.isAdaptiveColor)
MaterialValueHelper.getPrimaryTextColor(requireContext(), isLight)

View File

@ -202,7 +202,7 @@ class FullPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Ca
lastColor = color.backgroundColor
mask.backgroundTintList = ColorStateList.valueOf(color.backgroundColor)
controlsFragment.setColor(color)
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.backgroundColor)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, Color.WHITE, activity)
}

View File

@ -201,7 +201,7 @@ class GradientPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelpe
override fun onColorChanged(color: MediaNotificationProcessor) {
lastColor = color.backgroundColor
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.backgroundColor)
mask.backgroundTintList = ColorStateList.valueOf(color.backgroundColor)
colorBackground.setBackgroundColor(color.backgroundColor)
playerQueueSheet.setBackgroundColor(ColorUtil.darkenColor(color.backgroundColor))

View File

@ -93,7 +93,7 @@ class HomePlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Ca
override fun onColorChanged(color: MediaNotificationProcessor) {
lastColor = color.backgroundColor
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.backgroundColor)
ToolbarContentTintHelper.colorizeToolbar(
playerToolbar,
Color.WHITE,

View File

@ -52,7 +52,7 @@ class MaterialFragment : AbsPlayerFragment() {
override fun onColorChanged(color: MediaNotificationProcessor) {
playbackControlsFragment.setColor(color)
lastColor = color.backgroundColor
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.backgroundColor)
ToolbarContentTintHelper.colorizeToolbar(
playerToolbar,

View File

@ -78,7 +78,7 @@ class PlayerFragment : AbsPlayerFragment() {
override fun onColorChanged(color: MediaNotificationProcessor) {
controlsFragment.setColor(color)
lastColor = color.backgroundColor
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.backgroundColor)
ToolbarContentTintHelper.colorizeToolbar(
playerToolbar,

View File

@ -102,7 +102,7 @@ class PeakPlayerFragment : AbsPlayerFragment() {
override fun onColorChanged(color: MediaNotificationProcessor) {
lastColor = color.primaryTextColor
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.primaryTextColor)
controlsFragment.setColor(color)
}

View File

@ -97,7 +97,7 @@ class PlainPlayerFragment : AbsPlayerFragment() {
override fun onColorChanged(color: MediaNotificationProcessor) {
plainPlaybackControlsFragment.setColor(color)
lastColor = color.primaryTextColor
callbacks!!.onPaletteColorChanged()
libraryViewModel.updateColor(color.primaryTextColor)
ToolbarContentTintHelper.colorizeToolbar(
playerToolbar,
ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal),

View File

@ -71,7 +71,7 @@ class SimplePlayerFragment : AbsPlayerFragment() {
override fun onColorChanged(color: MediaNotificationProcessor) {
lastColor = color.backgroundColor
callbacks?.onPaletteColorChanged()
libraryViewModel.updateColor(color.backgroundColor)
controlsFragment.setColor(color)
ToolbarContentTintHelper.colorizeToolbar(
playerToolbar,

View File

@ -57,9 +57,9 @@ class TinyPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Ca
override fun onColorChanged(color: MediaNotificationProcessor) {
lastColor = color.backgroundColor
libraryViewModel.updateColor(color.backgroundColor)
toolbarColor = color.secondaryTextColor
controlsFragment.setColor(color)
callbacks?.onPaletteColorChanged()
title.setTextColor(color.primaryTextColor)
playerSongTotalTime.setTextColor(color.primaryTextColor)

View File

@ -11,7 +11,7 @@ import code.name.monkey.retromusic.adapter.playlist.PlaylistAdapter
import code.name.monkey.retromusic.fragments.LibraryViewModel
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewFragment
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
import org.koin.android.viewmodel.ext.android.sharedViewModel
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
class PlaylistsFragment :
AbsLibraryPagerRecyclerViewFragment<PlaylistAdapter, GridLayoutManager>(),
@ -21,7 +21,7 @@ class PlaylistsFragment :
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
libraryViewModel.allPlaylisits.observe(viewLifecycleOwner, Observer { playlists ->
libraryViewModel.playlisitsLiveData.observe(viewLifecycleOwner, Observer { playlists ->
if (playlists.isNotEmpty()) {
adapter?.swapDataSet(playlists)
} else {

View File

@ -23,8 +23,6 @@ import androidx.preference.ListPreference
import androidx.preference.Preference
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.*
import code.name.monkey.retromusic.util.NavigationUtil
@ -65,7 +63,7 @@ abstract class AbsSettingsFragment : ATEPreferenceFragmentCompat() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
setDivider(ColorDrawable(Color.TRANSPARENT))
listView.setBackgroundColor(ATHUtil.resolveColor(requireContext(), R.attr.colorSurface))
//listView.setBackgroundColor(ATHUtil.resolveColor(requireContext(), R.attr.colorSurface))
listView.overScrollMode = View.OVER_SCROLL_NEVER
listView.setPadding(0, 0, 0, 0)
listView.setPaddingRelative(0, 0, 0, 0)

View File

@ -13,7 +13,7 @@ import code.name.monkey.retromusic.fragments.ReloadType
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
import code.name.monkey.retromusic.util.PreferenceUtil
import org.koin.android.viewmodel.ext.android.sharedViewModel
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
class SongsFragment :
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<SongAdapter, GridLayoutManager>(),
@ -23,7 +23,7 @@ class SongsFragment :
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
libraryViewModel.allSongs.observe(viewLifecycleOwner, Observer {
libraryViewModel.songsLiveData.observe(viewLifecycleOwner, Observer {
if (it.isNotEmpty()) {
adapter?.swapDataSet(it)
} else {

View File

@ -63,8 +63,7 @@ class RepositoryImpl(
val genres =
GenreLoader.getAllGenres(context)
.shuffled()
.take(10)
.filter { it.name.length > 4 }
.filter { it.name.length in 5..10 }
if (genres.isNotEmpty()) {
return Home(

View File

@ -63,16 +63,14 @@ object PreferenceUtil {
}
fun registerOnSharedPreferenceChangedListener(
changeListener: OnSharedPreferenceChangeListener
) {
sharedPreferences.registerOnSharedPreferenceChangeListener(changeListener)
}
listener: OnSharedPreferenceChangeListener
) = sharedPreferences.registerOnSharedPreferenceChangeListener(listener)
fun unregisterOnSharedPreferenceChangedListener(
changeListener: OnSharedPreferenceChangeListener
) {
sharedPreferences.unregisterOnSharedPreferenceChangeListener(changeListener)
}
) = sharedPreferences.unregisterOnSharedPreferenceChangeListener(changeListener)
val baseTheme get() = sharedPreferences.getStringOrDefault(GENERAL_THEME, "auto")

View File

@ -46,7 +46,7 @@ class ListItemView : FrameLayout {
}
private fun init(context: Context, attrs: AttributeSet?) {
View.inflate(context, R.layout.list_item_view, this)
View.inflate(context, R.layout.list_item_view_no_card, this)
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.ListItemView)
if (typedArray.hasValue(R.styleable.ListItemView_listItemIcon)) {

View File

@ -51,7 +51,11 @@
</FrameLayout>
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
<androidx.fragment.app.FragmentContainerView
android:name="androidx.navigation.fragment.NavHostFragment"
app:defaultNavHost="true"
app:navGraph="@navigation/retro_graph"
tools:layout="@layout/fragment_main_activity_recycler_view"
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.fragment.app.FragmentContainerView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/playerFragmentContainer"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:defaultNavHost="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/now_playing" />

View File

@ -46,7 +46,7 @@
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
tools:srcCompat="@tools:sample/backgrounds/scenic" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/imageText"
@ -81,7 +81,7 @@
android:maxLines="1"
android:textAppearance="@style/TextViewSubtitle1"
android:textColor="?android:attr/textColorPrimary"
tools:text="@tools:sample/lorem/random" />
tools:text="@tools:sample/full_names" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
@ -90,7 +90,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:attr/textColorSecondary"
tools:text="@tools:sample/lorem/random" />
tools:text="@tools:sample/full_names" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatImageView

View File

@ -12,41 +12,46 @@
~ See the GNU General Public License for more details.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="PrivateResource">
app:cardCornerRadius="0dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal"
tools:srcCompat="@drawable/ic_telegram_white" />
tools:ignore="PrivateResource">
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toStartOf="@id/circle"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toTopOf="parent"
tools:maxLines="@string/grid_size_1"
tools:text="@tools:sample/lorem" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toStartOf="@id/circle"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toTopOf="parent"
tools:maxLines="@string/grid_size_1"
tools:text="@tools:sample/lorem" />
<code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@android:id/summary"
@ -62,19 +67,20 @@
tools:maxLines="2"
tools:text="@tools:sample/lorem/random" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
<code.name.monkey.appthemehelper.common.prefs.BorderCircleView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/circle"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<code.name.monkey.appthemehelper.common.prefs.BorderCircleView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/circle"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -11,37 +11,41 @@
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="PrivateResource">
app:cardCornerRadius="0dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
app:layout_constraintBottom_toBottomOf="@android:id/title"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@android:id/title"
app:tint="?attr/colorControlNormal"
tools:srcCompat="@drawable/ic_telegram_white" />
tools:ignore="PrivateResource">
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
app:layout_constraintBottom_toBottomOf="@android:id/title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@android:id/title"
app:tint="?attr/colorControlNormal"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
@ -64,11 +68,12 @@
tools:maxLines="2"
tools:text="@tools:sample/lorem/random" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="PrivateResource">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
app:layout_constraintBottom_toBottomOf="@android:id/title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@android:id/title"
app:tint="?attr/colorControlNormal"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toTopOf="parent"
tools:maxLines="@string/grid_size_1"
tools:text="@tools:sample/lorem/random" />
<code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@android:id/summary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textColor="?android:attr/textColorSecondary"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toBottomOf="@android:id/title"
android:textAppearance="@style/TextViewNormal"
tools:maxLines="2"
tools:text="@tools:sample/lorem/random" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -12,29 +12,35 @@
~ See the GNU General Public License for more details.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="PrivateResource">
app:cardCornerRadius="0dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal"
tools:ignore="PrivateResource">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
@ -50,11 +56,12 @@
tools:maxLines="@string/grid_size_1"
tools:text="@tools:sample/lorem/random" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -12,39 +12,45 @@
~ See the GNU General Public License for more details.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="PrivateResource">
app:cardCornerRadius="0dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constrainedWidth="true"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="PrivateResource">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toTopOf="parent"
tools:maxLines="@string/grid_size_1"
tools:text="@tools:sample/lorem" />
@ -93,11 +99,10 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="16dp"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/seekbar"
tools:text="20" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -12,29 +12,36 @@
~ See the GNU General Public License for more details.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
tools:ignore="PrivateResource">
app:cardCornerRadius="0dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal"
tools:srcCompat="@drawable/ic_telegram_white" />
tools:ignore="PrivateResource">
<com.google.android.material.textview.MaterialTextView
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -71,14 +78,15 @@
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
<code.name.monkey.appthemehelper.common.views.ATESwitch
android:id="@android:id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:focusable="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<code.name.monkey.appthemehelper.common.views.ATESwitch
android:id="@android:id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:focusable="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -12,60 +12,68 @@
~ See the GNU General Public License for more details.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
tools:ignore="PrivateResource">
app:cardCornerRadius="0dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingStart="0dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toTopOf="parent"
tools:maxLines="@string/grid_size_1"
tools:text="@tools:sample/lorem" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
<code.name.monkey.appthemehelper.common.views.ATESwitch
android:id="@android:id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:focusable="false"
app:layout_constraintBottom_toBottomOf="parent"
android:background="?attr/rectSelector"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingStart="?attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
app:layout_constraintStart_toStartOf="parent"
tools:ignore="PrivateResource">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingStart="0dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toTopOf="parent"
tools:maxLines="@string/grid_size_1"
tools:text="@tools:sample/lorem" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" />
<code.name.monkey.appthemehelper.common.views.ATESwitch
android:id="@android:id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:focusable="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -24,6 +24,7 @@
android:paddingStart="@dimen/pref_title_padding"
android:paddingTop="16dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp"
android:textAppearance="@style/TextViewOverline"
tools:text="@tools:sample/full_names" />
</LinearLayout>

View File

@ -22,7 +22,7 @@
<FrameLayout
android:id="@+id/slidingPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
app:behavior_hideable="false"
app:behavior_peekHeight="0dp"
@ -31,6 +31,7 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/playerFragmentContainer"
android:layout_width="match_parent"
android:name="code.name.monkey.retromusic.fragments.player.NowPlayingPlayerFragment"
android:layout_height="match_parent" />
<androidx.fragment.app.FragmentContainerView

View File

@ -1,80 +1,114 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/now_playing"
app:startDestination="@id/mainPlayerFragment">
<fragment
tools:layout="@layout/fragment_player"
android:id="@+id/playerFragment"
android:name="code.name.monkey.retromusic.fragments.player.normal.PlayerFragment"
android:label="PlayerFragment" />
<fragment
tools:layout="@layout/fragment_adaptive_player"
android:id="@+id/adaptiveFragment"
android:name="code.name.monkey.retromusic.fragments.player.adaptive.AdaptiveFragment"
android:label="AdaptiveFragment" />
<fragment
tools:layout="@layout/fragment_blur"
android:id="@+id/blurPlayerFragment"
android:name="code.name.monkey.retromusic.fragments.player.blur.BlurPlayerFragment"
android:label="BlurPlayerFragment" />
<fragment
tools:layout="@layout/fragment_card_blur_player"
android:id="@+id/cardBlurFragment"
android:name="code.name.monkey.retromusic.fragments.player.cardblur.CardBlurFragment"
android:label="CardBlurFragment" />
<fragment
tools:layout="@layout/fragment_card_player"
android:id="@+id/cardFragment"
android:name="code.name.monkey.retromusic.fragments.player.card.CardFragment"
android:label="CardFragment" />
<fragment
tools:layout="@layout/fragment_circle_player"
android:id="@+id/circlePlayerFragment"
android:name="code.name.monkey.retromusic.fragments.player.circle.CirclePlayerFragment"
android:label="CirclePlayerFragment" />
<fragment
tools:layout="@layout/fragment_classic_player"
android:id="@+id/classicPlayerFragment"
android:name="code.name.monkey.retromusic.fragments.player.classic.ClassicPlayerFragment"
android:label="ClassicPlayerFragment" />
<fragment
tools:layout="@layout/fragment_color_player"
android:id="@+id/colorFragment"
android:name="code.name.monkey.retromusic.fragments.player.color.ColorFragment"
android:label="ColorFragment" />
<fragment
tools:layout="@layout/fragment_fit"
android:id="@+id/fitFragment"
android:name="code.name.monkey.retromusic.fragments.player.fit.FitFragment"
android:label="FitFragment" />
<fragment
tools:layout="@layout/fragment_flat_player"
android:id="@+id/flatPlayerFragment"
android:name="code.name.monkey.retromusic.fragments.player.flat.FlatPlayerFragment"
android:label="FlatPlayerFragment" />
<fragment
tools:layout="@layout/fragment_full"
android:id="@+id/fullPlayerFragment"
android:name="code.name.monkey.retromusic.fragments.player.full.FullPlayerFragment"
android:label="FullPlayerFragment" />
<fragment
tools:layout="@layout/fragment_gradient_player"
android:id="@+id/gradientPlayerFragment"
android:name="code.name.monkey.retromusic.fragments.player.gradient.GradientPlayerFragment"
android:label="GradientPlayerFragment" />
<fragment
tools:layout="@layout/fragment_material"
android:id="@+id/materialFragment"
android:name="code.name.monkey.retromusic.fragments.player.material.MaterialFragment"
android:label="MaterialFragment" />
<fragment
android:id="@+id/peakPlayerFragment"
tools:layout="@layout/fragment_peak_player"
android:name="code.name.monkey.retromusic.fragments.player.peak.PeakPlayerFragment"
android:label="PeakPlayerFragment" />
<fragment
android:id="@+id/plainPlayerFragment"
tools:layout="@layout/fragment_plain_player"
android:name="code.name.monkey.retromusic.fragments.player.plain.PlainPlayerFragment"
android:label="PlainPlayerFragment" />
<fragment
tools:layout="@layout/fragment_simple_player"
android:id="@+id/simplePlayerFragment"
android:name="code.name.monkey.retromusic.fragments.player.simple.SimplePlayerFragment"
android:label="SimplePlayerFragment" />
<fragment
tools:layout="@layout/fragment_tiny_player"
android:id="@+id/tinyPlayerFragment"
android:name="code.name.monkey.retromusic.fragments.player.tiny.TinyPlayerFragment"
android:label="TinyPlayerFragment" />
<fragment
android:id="@+id/mainPlayerFragment"
android:name="code.name.monkey.retromusic.fragments.player.MainPlayerFragment"
android:name="code.name.monkey.retromusic.fragments.player.NowPlayingPlayerFragment"
android:label="MainPlayerFragment">
<action
android:id="@+id/action_mainPlayerFragment_to_adaptiveFragment"

View File

@ -1,33 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/retro_graph"
app:startDestination="@id/mainFragment">
app:startDestination="@id/action_song">
<fragment
android:id="@+id/mainFragment"
android:name="code.name.monkey.retromusic.fragments.main.MainFragment"
android:label="MainFragment"
tools:layout="@layout/fragment_main" />
<fragment
android:id="@+id/albumsFragment"
android:id="@+id/action_album"
android:name="code.name.monkey.retromusic.fragments.albums.AlbumsFragment"
android:label="AlbumsFragment" />
<fragment
android:id="@+id/artistsFragment"
android:id="@+id/action_artist"
android:name="code.name.monkey.retromusic.fragments.artists.ArtistsFragment"
android:label="ArtistsFragment" />
<fragment
android:id="@+id/songsFragment"
android:id="@+id/action_song"
android:name="code.name.monkey.retromusic.fragments.songs.SongsFragment"
android:label="SongsFragment" />
<fragment
android:id="@+id/genresFragment"
android:id="@+id/action_genre"
android:name="code.name.monkey.retromusic.fragments.genres.GenresFragment"
android:label="GenresFragment" />
<fragment
android:id="@+id/playlistsFragment"
android:id="@+id/action_playlist"
android:name="code.name.monkey.retromusic.fragments.playlists.PlaylistsFragment"
android:label="PlaylistsFragment" />
<fragment
android:id="@+id/action_playing_queue"
android:name="code.name.monkey.retromusic.fragments.queue.PlayingQueueFragment"
android:label="PlayingQueueFragment" />
<fragment
android:id="@+id/action_folder"
android:name="code.name.monkey.retromusic.fragments.folder.FoldersFragment"
android:label="FoldersFragment" />
<fragment
android:id="@+id/action_home"
android:name="code.name.monkey.retromusic.fragments.home.BannerHomeFragment"
android:label="BannerHomeFragment" />
</navigation>

View File

@ -8,8 +8,9 @@
<fragment
android:id="@+id/mainSettingsFragment"
android:name="code.name.monkey.retromusic.fragments.settings.MainSettingsFragment"
android:label="MainSettingsFragment"
android:label="Settings"
tools:layout="@layout/fragment_main_settings">
<action
android:id="@+id/action_mainSettingsFragment_to_themeSettingsFragment"
app:destination="@id/themeSettingsFragment"
@ -68,31 +69,37 @@
<fragment
android:id="@+id/audioSettings"
android:name="code.name.monkey.retromusic.fragments.settings.AudioSettings"
android:label="AudioSettings" />
android:label="Audio" />
<fragment
android:id="@+id/imageSettingFragment"
android:name="code.name.monkey.retromusic.fragments.settings.ImageSettingFragment"
android:label="ImageSettingFragment" />
android:label="Image" />
<fragment
android:id="@+id/notificationSettingsFragment"
android:name="code.name.monkey.retromusic.fragments.settings.NotificationSettingsFragment"
android:label="NotificationSettingsFragment" />
android:label="Notification" />
<fragment
android:id="@+id/nowPlayingSettingsFragment"
android:name="code.name.monkey.retromusic.fragments.settings.NowPlayingSettingsFragment"
android:label="NowPlayingSettingsFragment" />
android:label="Now Playing" />
<fragment
android:id="@+id/otherSettingsFragment"
android:name="code.name.monkey.retromusic.fragments.settings.OtherSettingsFragment"
android:label="OtherSettingsFragment" />
android:label="Other" />
<fragment
android:id="@+id/personalizeSettingsFragment"
android:name="code.name.monkey.retromusic.fragments.settings.PersonalizeSettingsFragment"
android:label="PersonalizeSettingsFragment" />
android:label="Personalize" />
<fragment
android:id="@+id/themeSettingsFragment"
android:name="code.name.monkey.retromusic.fragments.settings.ThemeSettingsFragment"
android:label="ThemeSettingsFragment" />
android:label="Look &amp; Feel" />
<activity
android:id="@+id/aboutActivity"

View File

@ -22,6 +22,7 @@
android:title="@string/black_theme_name" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory
android:key="category_color"
android:layout="@layout/preference_category_title"