Fix hiding year if not available
This commit is contained in:
parent
e49bea1cc9
commit
05146d6258
2 changed files with 5 additions and 5 deletions
|
@ -139,8 +139,11 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView {
|
||||||
this.album = album
|
this.album = album
|
||||||
|
|
||||||
albumTitle.text = album.title
|
albumTitle.text = album.title
|
||||||
albumText.text = String.format("%s • %s • %s", album.artistName, MusicUtil.getYearString(album.year), MusicUtil.getReadableDurationString(MusicUtil.getTotalDuration(this, album.songs)))
|
if (MusicUtil.getYearString(album.year) == "-") {
|
||||||
|
albumText.text = String.format("%s • %s", album.artistName, MusicUtil.getReadableDurationString(MusicUtil.getTotalDuration(this, album.songs)))
|
||||||
|
} else {
|
||||||
|
albumText.text = String.format("%s • %s • %s", album.artistName, MusicUtil.getYearString(album.year), MusicUtil.getReadableDurationString(MusicUtil.getTotalDuration(this, album.songs)))
|
||||||
|
}
|
||||||
loadAlbumCover()
|
loadAlbumCover()
|
||||||
simpleSongAdapter.swapDataSet(album.songs)
|
simpleSongAdapter.swapDataSet(album.songs)
|
||||||
albumDetailsPresenter.loadMore(album.artistId)
|
albumDetailsPresenter.loadMore(album.artistId)
|
||||||
|
|
|
@ -17,7 +17,6 @@ import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.annotation.CheckResult;
|
import androidx.annotation.CheckResult;
|
||||||
import androidx.annotation.ColorInt;
|
import androidx.annotation.ColorInt;
|
||||||
|
@ -91,8 +90,6 @@ public final class ToolbarContentTintHelper {
|
||||||
final View backButton = toolbar.getChildAt(i);
|
final View backButton = toolbar.getChildAt(i);
|
||||||
if (backButton instanceof ImageView) {
|
if (backButton instanceof ImageView) {
|
||||||
((ImageView) backButton).getDrawable().setColorFilter(colorFilter);
|
((ImageView) backButton).getDrawable().setColorFilter(colorFilter);
|
||||||
} else if (backButton instanceof TextView) {
|
|
||||||
// ((TextView) backButton).setTextColor(color);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue