mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
fix: don't show empty genre TextView if album has no genre
This commit is contained in:
parent
44f8160e21
commit
1f347209b5
2 changed files with 7 additions and 2 deletions
|
|
@ -146,7 +146,10 @@ public class AlbumPageFragment extends Fragment implements ClickCallback {
|
|||
bind.albumArtistLabel.setText(album.getArtist());
|
||||
bind.albumReleaseYearLabel.setText(album.getYear() != 0 ? String.valueOf(album.getYear()) : "");
|
||||
bind.albumSongCountDurationTextview.setText(getString(R.string.album_page_tracks_count_and_duration, album.getSongCount(), album.getDuration() != null ? album.getDuration() / 60 : 0));
|
||||
bind.albumGenresTextview.setText(album.getGenre());
|
||||
if (album.getGenre() != null && !album.getGenre().isEmpty()) {
|
||||
bind.albumGenresTextview.setText(album.getGenre());
|
||||
bind.albumGenresTextview.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (album.getReleaseDate() != null && album.getOriginalReleaseDate() != null) {
|
||||
if (album.getReleaseDate().getFormattedDate() != null || album.getOriginalReleaseDate().getFormattedDate() != null)
|
||||
|
|
|
|||
|
|
@ -126,9 +126,11 @@
|
|||
android:layout_marginEnd="18dp"
|
||||
android:text="@string/label_placeholder"
|
||||
android:textAlignment="center"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_song_count_duration_textview"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue