mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Added play next button in bottom_sheet_header
This commit is contained in:
parent
032250b296
commit
821ab6149b
3 changed files with 35 additions and 5 deletions
|
|
@ -65,7 +65,7 @@ public class PlayerBottomSheetFragment extends Fragment implements MusicServiceE
|
|||
initQueueSlideView();
|
||||
initQueueRecyclerView();
|
||||
initFavoriteButtonClick();
|
||||
initToggleButtonSongState();
|
||||
initMusicCommandButton();
|
||||
|
||||
return view;
|
||||
}
|
||||
|
|
@ -209,7 +209,7 @@ public class PlayerBottomSheetFragment extends Fragment implements MusicServiceE
|
|||
bind.playerBodyLayout.buttonFavorite.setOnClickListener(v -> playerBottomSheetViewModel.setFavorite());
|
||||
}
|
||||
|
||||
private void initToggleButtonSongState() {
|
||||
private void initMusicCommandButton() {
|
||||
bind.playerHeaderLayout.playerHeaderButton.setOnClickListener(v -> {
|
||||
if (MusicPlayerRemote.isPlaying()) {
|
||||
MusicPlayerRemote.pauseSong();
|
||||
|
|
@ -217,6 +217,13 @@ public class PlayerBottomSheetFragment extends Fragment implements MusicServiceE
|
|||
MusicPlayerRemote.resumePlaying();
|
||||
}
|
||||
});
|
||||
|
||||
bind.playerHeaderLayout.playerHeaderNextSongButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
MusicPlayerRemote.playNextSong();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initSeekBar() {
|
||||
|
|
|
|||
9
app/src/main/res/drawable/ic_skip_next.xml
Normal file
9
app/src/main/res/drawable/ic_skip_next.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/titleTextColor"
|
||||
android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"/>
|
||||
</vector>
|
||||
|
|
@ -26,6 +26,7 @@
|
|||
android:ellipsize="end"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:textColor="@color/titleTextColor"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
|
|
@ -39,6 +40,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/open_sans_font_family"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:textColor="@color/subtitleTextColor"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/player_header_button"
|
||||
|
|
@ -47,8 +49,8 @@
|
|||
|
||||
<ToggleButton
|
||||
android:id="@+id/player_header_button"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@drawable/button_play_pause_selector"
|
||||
|
|
@ -58,9 +60,21 @@
|
|||
android:textOff=""
|
||||
android:textOn=""
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/player_header_next_song_button"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/player_header_next_song_button"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@drawable/ic_skip_next"
|
||||
android:foreground="?android:attr/selectableItemBackgroundBorderless"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/player_header_seek_bar"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue