mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-02 15:33:36 +00:00
Set track number inside the track adapter in AlbumPageFragment
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user