mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
Simplified layout hierarchy in fragment_album_page
This commit is contained in:
parent
9312d0e203
commit
76a1bc6541
2 changed files with 44 additions and 50 deletions
|
|
@ -122,18 +122,12 @@ public class AlbumPageFragment extends Fragment {
|
|||
activity.getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
}
|
||||
|
||||
bind.animToolbar.setTitle(albumPageViewModel.getAlbum().getTitle());
|
||||
|
||||
bind.albumNameLabel.setText(albumPageViewModel.getAlbum().getTitle());
|
||||
bind.albumArtistLabel.setText(albumPageViewModel.getAlbum().getArtistName());
|
||||
bind.albumReleaseYearLabel.setText(albumPageViewModel.getAlbum().getYear() != 0 ? String.valueOf(albumPageViewModel.getAlbum().getYear()) : "");
|
||||
|
||||
bind.appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> {
|
||||
if ((bind.albumInfoSector.getHeight() + verticalOffset) < (2 * ViewCompat.getMinimumHeight(bind.animToolbar))) {
|
||||
bind.animToolbar.setTitle(albumPageViewModel.getAlbum().getTitle());
|
||||
} else {
|
||||
bind.animToolbar.setTitle("Album");
|
||||
}
|
||||
});
|
||||
|
||||
bind.animToolbar.setNavigationOnClickListener(v -> activity.navController.navigateUp());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue