Updating
Constants names Proper namings Bottom tabs slide animation Added home album list style change
This commit is contained in:
parent
b9c12e20dd
commit
9850341d4c
81 changed files with 291 additions and 231 deletions
|
@ -225,10 +225,10 @@ class HomeAdapter(
|
|||
}
|
||||
|
||||
fun artistsAdapter(artists: List<Artist>) =
|
||||
ArtistAdapter(activity, artists, PreferenceUtil.homeGridStyle, null, this)
|
||||
ArtistAdapter(activity, artists, PreferenceUtil.homeArtistGridStyle, null, this)
|
||||
|
||||
fun albumAdapter(albums: List<Album>) =
|
||||
AlbumAdapter(activity, albums, R.layout.item_image, null, this)
|
||||
AlbumAdapter(activity, albums, PreferenceUtil.homeAlbumGridStyle, null, this)
|
||||
|
||||
fun gridLayoutManager() = GridLayoutManager(activity, 1, GridLayoutManager.HORIZONTAL, false)
|
||||
fun linearLayoutManager() = LinearLayoutManager(activity, LinearLayoutManager.HORIZONTAL, false)
|
||||
|
|
|
@ -98,14 +98,14 @@ class AlbumCoverPagerAdapter(
|
|||
|
||||
private fun showLyricsDialog() {
|
||||
lifecycleScope.launch(Dispatchers.IO) {
|
||||
val data: String = MusicUtil.getLyrics(song) ?: "No lyrics found"
|
||||
val data: String? = MusicUtil.getLyrics(song)
|
||||
withContext(Dispatchers.Main) {
|
||||
MaterialAlertDialogBuilder(
|
||||
requireContext(),
|
||||
R.style.ThemeOverlay_MaterialComponents_Dialog_Alert
|
||||
).apply {
|
||||
setTitle(song.title)
|
||||
setMessage(data)
|
||||
setMessage(if (data.isNullOrEmpty()) "No lyrics found" else data)
|
||||
setNegativeButton(R.string.synced_lyrics) { _, _ ->
|
||||
NavigationUtil.goToLyrics(requireActivity())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue