Removed redundant Song title and artist name in lyrics toolbar
This commit is contained in:
parent
62e016bf9b
commit
051a9d8ef9
2 changed files with 21 additions and 49 deletions
|
@ -149,7 +149,6 @@ class LyricsFragment : AbsMusicServiceFragment(R.layout.fragment_lyrics) {
|
|||
setupWakelock()
|
||||
setupViews()
|
||||
setupToolbar()
|
||||
updateTitleSong()
|
||||
}
|
||||
|
||||
private fun setupViews() {
|
||||
|
@ -186,22 +185,6 @@ class LyricsFragment : AbsMusicServiceFragment(R.layout.fragment_lyrics) {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onPlayingMetaChanged() {
|
||||
super.onPlayingMetaChanged()
|
||||
updateTitleSong()
|
||||
}
|
||||
|
||||
override fun onServiceConnected() {
|
||||
super.onServiceConnected()
|
||||
updateTitleSong()
|
||||
}
|
||||
|
||||
private fun updateTitleSong() {
|
||||
song = MusicPlayerRemote.currentSong
|
||||
binding.toolbar.title = song.title
|
||||
binding.toolbar.subtitle = song.artistName
|
||||
}
|
||||
|
||||
private fun setupWakelock() {
|
||||
requireActivity().window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue