mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-03 19:01:39 +00:00
First song played: What she said - The Smiths
This commit is contained in:
parent
c1c02b3c37
commit
0f19fc3190
12 changed files with 47 additions and 221 deletions
|
|
@ -6,7 +6,6 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
|
@ -154,34 +153,15 @@ public class PlayerBottomSheetFragment extends Fragment implements MusicServiceE
|
|||
bind.playerHeaderLayout.playerHeaderSongArtistLabel.setText(song.getArtistName());
|
||||
|
||||
bind.playerBodyLayout.buttonFavorite.setChecked(song.isFavorite());
|
||||
|
||||
playSong(song);
|
||||
}
|
||||
|
||||
private void setUpMusicControllers() {
|
||||
setUpPlayPauseButton();
|
||||
// setUpPrevNext();
|
||||
// setUpRepeatButton();
|
||||
// setUpShuffleButton();
|
||||
initSeekBar();
|
||||
}
|
||||
|
||||
private void setUpPlayPauseButton() {
|
||||
bind.playerBodyLayout.playPauseButton.setOnClickListener(v -> {
|
||||
if (MusicPlayerRemote.isPlaying()) {
|
||||
MusicPlayerRemote.pauseSong();
|
||||
Toast.makeText(requireContext(), "PAUSING", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
MusicPlayerRemote.resumePlaying();
|
||||
Toast.makeText(requireContext(), "PLAYING", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void playSong(Song song) {
|
||||
// Toast.makeText(activity, MusicUtil.getSongFileUri(song), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
public View getPlayerHeader() {
|
||||
return getView().findViewById(R.id.player_header_layout);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue