mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-01-31 14:43:36 +00:00
Add a button shortcut in SongBottomSheetDialog to rate the track
This commit is contained in:
@@ -51,6 +51,7 @@ public class SongBottomSheetDialog extends BottomSheetDialogFragment implements
|
||||
private TextView playRadio;
|
||||
private TextView playNext;
|
||||
private TextView addToQueue;
|
||||
private TextView rate;
|
||||
private TextView download;
|
||||
private TextView addToPlaylist;
|
||||
private TextView goToAlbum;
|
||||
@@ -148,6 +149,18 @@ public class SongBottomSheetDialog extends BottomSheetDialogFragment implements
|
||||
dismissBottomSheet();
|
||||
});
|
||||
|
||||
rate = view.findViewById(R.id.rate_text_view);
|
||||
rate.setOnClickListener(v -> {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putParcelable("song_object", song);
|
||||
|
||||
RatingDialog dialog = new RatingDialog();
|
||||
dialog.setArguments(bundle);
|
||||
dialog.show(requireActivity().getSupportFragmentManager(), null);
|
||||
|
||||
dismissBottomSheet();
|
||||
});
|
||||
|
||||
download = view.findViewById(R.id.download_text_view);
|
||||
download.setOnClickListener(v -> {
|
||||
DownloadUtil.getDownloadTracker(requireContext()).toggleDownload(Arrays.asList(song));
|
||||
|
||||
Reference in New Issue
Block a user