mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-01 23:13:36 +00:00
First song played: What she said - The Smiths
This commit is contained in:
@@ -151,7 +151,6 @@ public class BaseActivity extends AppCompatActivity implements EasyPermissions.P
|
||||
|
||||
final IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(MusicService.STATE_CHANGED);
|
||||
filter.addAction(MusicService.REPEAT_MODE_CHANGED);
|
||||
filter.addAction(MusicService.META_CHANGED);
|
||||
filter.addAction(MusicService.QUEUE_CHANGED);
|
||||
|
||||
@@ -240,9 +239,6 @@ public class BaseActivity extends AppCompatActivity implements EasyPermissions.P
|
||||
case MusicService.STATE_CHANGED:
|
||||
activity.onPlayStateChanged();
|
||||
break;
|
||||
case MusicService.REPEAT_MODE_CHANGED:
|
||||
activity.onRepeatModeChanged();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user