Fix crashing for song info
This commit is contained in:
parent
c35d86bfd6
commit
53e3eb2f41
2 changed files with 16 additions and 11 deletions
|
@ -2,6 +2,7 @@ package code.name.monkey.retromusic.adapter.playlist
|
|||
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.text.TextUtils
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
|
@ -62,15 +63,15 @@ class PlaylistAdapter(
|
|||
return createViewHolder(view)
|
||||
}
|
||||
|
||||
protected fun createViewHolder(view: View): ViewHolder {
|
||||
fun createViewHolder(view: View): ViewHolder {
|
||||
return ViewHolder(view)
|
||||
}
|
||||
|
||||
protected fun getPlaylistTitle(playlist: Playlist): String {
|
||||
return playlist.name
|
||||
private fun getPlaylistTitle(playlist: Playlist): String {
|
||||
return if (TextUtils.isEmpty(playlist.name)) "-" else playlist.name
|
||||
}
|
||||
|
||||
protected fun getPlaylistText(playlist: Playlist): String {
|
||||
private fun getPlaylistText(playlist: Playlist): String {
|
||||
return MusicUtil.getPlaylistInfoString(activity, getSongs(playlist))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue