Smart playlist decoration (#619)
* Show smart playlist threshold and number of tracks in addition to the playlist title (#4) * Remove todo tags (#5) * Indentation * Code review
This commit is contained in:
parent
93bb9cf7fc
commit
e461f44ff0
9 changed files with 134 additions and 15 deletions
|
|
@ -83,6 +83,15 @@ public class PlaylistAdapter extends AbsMultiSelectAdapter<PlaylistAdapter.ViewH
|
|||
return new ViewHolder(view, viewType);
|
||||
}
|
||||
|
||||
protected String getPlaylistTitle(Playlist playlist) {
|
||||
return playlist.name;
|
||||
}
|
||||
|
||||
protected String getPlaylistText(Playlist playlist) {
|
||||
Context context = App.getInstance().getApplicationContext();
|
||||
return playlist.getInfoString(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
final Playlist playlist = dataSet.get(position);
|
||||
|
|
@ -90,7 +99,10 @@ public class PlaylistAdapter extends AbsMultiSelectAdapter<PlaylistAdapter.ViewH
|
|||
holder.itemView.setActivated(isChecked(playlist));
|
||||
|
||||
if (holder.title != null) {
|
||||
holder.title.setText(playlist.name);
|
||||
holder.title.setText(getPlaylistTitle(playlist));
|
||||
}
|
||||
if (holder.text != null) {
|
||||
holder.text.setText(getPlaylistText(playlist));
|
||||
}
|
||||
|
||||
if (holder.getAdapterPosition() == getItemCount() - 1) {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ public class PlayingQueueAdapter extends SongAdapter implements DraggableItemAda
|
|||
if (holder.imageText != null) {
|
||||
holder.imageText.setText(String.valueOf(position - current));
|
||||
}
|
||||
|
||||
if (holder.getItemViewType() == HISTORY || holder.getItemViewType() == CURRENT) {
|
||||
setAlpha(holder, 0.5f);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue