diff --git a/app/src/main/java/com/cappielloantonio/tempo/ui/fragment/AlbumPageFragment.java b/app/src/main/java/com/cappielloantonio/tempo/ui/fragment/AlbumPageFragment.java index 83bc8ece..2d256443 100644 --- a/app/src/main/java/com/cappielloantonio/tempo/ui/fragment/AlbumPageFragment.java +++ b/app/src/main/java/com/cappielloantonio/tempo/ui/fragment/AlbumPageFragment.java @@ -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) diff --git a/app/src/main/res/layout/fragment_album_page.xml b/app/src/main/res/layout/fragment_album_page.xml index 0e58bf74..411d5c1c 100644 --- a/app/src/main/res/layout/fragment_album_page.xml +++ b/app/src/main/res/layout/fragment_album_page.xml @@ -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" />