Made the artist info string prettier.
This commit is contained in:
parent
82085fccbb
commit
9c84d59d89
2 changed files with 1 additions and 4 deletions
|
|
@ -93,9 +93,6 @@ public class ArtistAdapter extends AbsMultiSelectAdapter<ArtistAdapter.ViewHolde
|
||||||
public void onBindViewHolder(@NonNull final ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull final ViewHolder holder, int position) {
|
||||||
final Artist artist = dataSet.get(position);
|
final Artist artist = dataSet.get(position);
|
||||||
|
|
||||||
// final int defaultBarColor = PhonographColorUtil.resolveColor(activity, R.attr.default_bar_color);
|
|
||||||
// setColors(defaultBarColor, holder);
|
|
||||||
|
|
||||||
boolean isChecked = isChecked(artist);
|
boolean isChecked = isChecked(artist);
|
||||||
holder.itemView.setActivated(isChecked);
|
holder.itemView.setActivated(isChecked);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ public class MusicUtil {
|
||||||
public static String getArtistInfoString(@NonNull final Context context, @NonNull final Artist artist) {
|
public static String getArtistInfoString(@NonNull final Context context, @NonNull final Artist artist) {
|
||||||
String albumString = artist.albumCount == 1 ? context.getResources().getString(R.string.album) : context.getResources().getString(R.string.albums);
|
String albumString = artist.albumCount == 1 ? context.getResources().getString(R.string.album) : context.getResources().getString(R.string.albums);
|
||||||
String songString = artist.songCount == 1 ? context.getResources().getString(R.string.song) : context.getResources().getString(R.string.songs);
|
String songString = artist.songCount == 1 ? context.getResources().getString(R.string.song) : context.getResources().getString(R.string.songs);
|
||||||
return artist.albumCount + " " + albumString + " | " + artist.songCount + " " + songString;
|
return artist.albumCount + " " + albumString + " • " + artist.songCount + " " + songString;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getReadableDurationString(long songDurationMillis) {
|
public static String getReadableDurationString(long songDurationMillis) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue