mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 10:23:33 +00:00
Set track number inside the track adapter in AlbumPageFragment
This commit is contained in:
parent
9ae9873326
commit
d78668d6c5
11 changed files with 50 additions and 14 deletions
|
|
@ -187,7 +187,7 @@ public class AlbumPageFragment extends Fragment {
|
|||
bind.songRecyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
bind.songRecyclerView.setHasFixedSize(true);
|
||||
|
||||
songHorizontalAdapter = new SongHorizontalAdapter(activity, requireContext());
|
||||
songHorizontalAdapter = new SongHorizontalAdapter(activity, requireContext(), false);
|
||||
bind.songRecyclerView.setAdapter(songHorizontalAdapter);
|
||||
|
||||
albumPageViewModel.getAlbumSongLiveList().observe(requireActivity(), songs -> {
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ public class ArtistPageFragment extends Fragment {
|
|||
private void initTopSongsView() {
|
||||
bind.mostStreamedSongRecyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
|
||||
songHorizontalAdapter = new SongHorizontalAdapter(activity, requireContext());
|
||||
songHorizontalAdapter = new SongHorizontalAdapter(activity, requireContext(), true);
|
||||
bind.mostStreamedSongRecyclerView.setAdapter(songHorizontalAdapter);
|
||||
artistPageViewModel.getArtistTopSongList(10).observe(requireActivity(), songs -> {
|
||||
if (bind != null) bind.artistPageTopSongsSector.setVisibility(!songs.isEmpty() ? View.VISIBLE : View.GONE);
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ public class DownloadFragment extends Fragment {
|
|||
private void initDownloadedSongView() {
|
||||
bind.downloadedTracksRecyclerView.setHasFixedSize(true);
|
||||
|
||||
downloadedTrackAdapter = new SongHorizontalAdapter(activity, requireContext());
|
||||
downloadedTrackAdapter = new SongHorizontalAdapter(activity, requireContext(), true);
|
||||
bind.downloadedTracksRecyclerView.setAdapter(downloadedTrackAdapter);
|
||||
downloadViewModel.getDownloadedTracks(requireActivity(), 20).observe(requireActivity(), songs -> {
|
||||
if (songs == null) {
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ public class HomeFragment extends Fragment {
|
|||
private void initStarredTracksView() {
|
||||
bind.starredTracksRecyclerView.setHasFixedSize(true);
|
||||
|
||||
starredSongAdapter = new SongHorizontalAdapter(activity, requireContext());
|
||||
starredSongAdapter = new SongHorizontalAdapter(activity, requireContext(), true);
|
||||
bind.starredTracksRecyclerView.setAdapter(starredSongAdapter);
|
||||
homeViewModel.getStarredTracks(requireActivity()).observe(requireActivity(), songs -> {
|
||||
if (songs == null) {
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ public class PlaylistPageFragment extends Fragment {
|
|||
bind.songRecyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
bind.songRecyclerView.setHasFixedSize(true);
|
||||
|
||||
songHorizontalAdapter = new SongHorizontalAdapter(activity, requireContext());
|
||||
songHorizontalAdapter = new SongHorizontalAdapter(activity, requireContext(), true);
|
||||
bind.songRecyclerView.setAdapter(songHorizontalAdapter);
|
||||
|
||||
playlistPageViewModel.getPlaylistSongLiveList().observe(requireActivity(), songs -> {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public class SearchFragment extends Fragment {
|
|||
bind.searchResultTracksRecyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
bind.searchResultTracksRecyclerView.setHasFixedSize(true);
|
||||
|
||||
songHorizontalAdapter = new SongHorizontalAdapter(activity, requireContext());
|
||||
songHorizontalAdapter = new SongHorizontalAdapter(activity, requireContext(), true);
|
||||
bind.searchResultTracksRecyclerView.setAdapter(songHorizontalAdapter);
|
||||
|
||||
// Albums
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ public class SongListPageFragment extends Fragment {
|
|||
bind.songListRecyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
bind.songListRecyclerView.setHasFixedSize(true);
|
||||
|
||||
songHorizontalAdapter = new SongHorizontalAdapter(activity, requireContext());
|
||||
songHorizontalAdapter = new SongHorizontalAdapter(activity, requireContext(), true);
|
||||
bind.songListRecyclerView.setAdapter(songHorizontalAdapter);
|
||||
songListPageViewModel.getSongList(requireActivity()).observe(requireActivity(), songs -> songHorizontalAdapter.setItems(songs));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue