Fixed the none repeat mode not working when at the end of the playing queue. Reverted new color and elevation of songs and artists.
This commit is contained in:
parent
4017815711
commit
a86afe6111
9 changed files with 31 additions and 21 deletions
|
|
@ -447,7 +447,7 @@ public class MusicService extends Service {
|
|||
|
||||
public int getNextPosition(boolean force) {
|
||||
int position = getPosition() + 1;
|
||||
switch (repeatMode) {
|
||||
switch (getRepeatMode()) {
|
||||
case REPEAT_MODE_ALL:
|
||||
if (isLastTrack()) {
|
||||
position = 0;
|
||||
|
|
@ -459,7 +459,7 @@ public class MusicService extends Service {
|
|||
position = 0;
|
||||
}
|
||||
} else {
|
||||
position = getPosition();
|
||||
position -= 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -658,11 +658,11 @@ public class MusicService extends Service {
|
|||
playerHandler.removeMessages(FADE_DOWN_AND_PAUSE);
|
||||
playerHandler.sendEmptyMessage(FADE_UP_AND_RESUME);
|
||||
} else {
|
||||
playImpl();
|
||||
try {
|
||||
player.setVolume(1f);
|
||||
} catch (IllegalStateException ignored) {
|
||||
}
|
||||
playImpl();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -923,13 +923,23 @@ public class MusicService extends Service {
|
|||
break;
|
||||
|
||||
case TRACK_WENT_TO_NEXT:
|
||||
service.setPosition(service.nextPosition);
|
||||
service.prepareNext();
|
||||
service.notifyChange(META_CHANGED);
|
||||
if (service.getRepeatMode() == REPEAT_MODE_NONE && service.isLastTrack()) {
|
||||
service.pause(true);
|
||||
service.seek(0);
|
||||
} else {
|
||||
service.setPosition(service.nextPosition);
|
||||
service.prepareNext();
|
||||
service.notifyChange(META_CHANGED);
|
||||
}
|
||||
break;
|
||||
|
||||
case TRACK_ENDED:
|
||||
service.playNextSong(false);
|
||||
if (service.getRepeatMode() == REPEAT_MODE_NONE && service.isLastTrack()) {
|
||||
service.notifyChange(PLAYSTATE_CHANGED);
|
||||
service.seek(0);
|
||||
} else {
|
||||
service.playNextSong(false);
|
||||
}
|
||||
break;
|
||||
|
||||
case RELEASE_WAKELOCK:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
android:layout_height="104dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:transitionName="@string/transition_album_cover"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
tools:ignore="ContentDescription,UnusedAttribute" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/footer"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:background="?card_color"
|
||||
android:elevation="2dp"
|
||||
android:foreground="?rect_selector"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
|
|
@ -13,9 +11,10 @@
|
|||
android:layout_height="match_parent"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingStart="16dp"
|
||||
tools:ignore="RtlSymmetry">
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/track_number"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:background="?card_color"
|
||||
android:elevation="2dp"
|
||||
android:foreground="?rect_selector"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:background="?card_color"
|
||||
android:elevation="2dp"
|
||||
android:foreground="?rect_selector"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
|
|
@ -13,7 +11,9 @@
|
|||
android:layout_height="match_parent"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="16dp">
|
||||
|
||||
<com.kabouzeid.gramophone.views.WidthFitSquareImageView
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="16dp">
|
||||
|
||||
<ImageView
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:background="?card_color"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:elevation="2dp"
|
||||
android:orientation="horizontal"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
|
|
@ -31,6 +29,7 @@
|
|||
<ImageView
|
||||
android:id="@+id/menu"
|
||||
style="@style/OverFlowButton"
|
||||
android:layout_gravity="center_vertical" />
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -12,7 +12,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="16dp">
|
||||
|
||||
<ImageView
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:background="?card_color"
|
||||
android:elevation="2dp"
|
||||
android:foreground="?rect_selector"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
|
|
@ -13,7 +11,9 @@
|
|||
android:layout_height="match_parent"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="16dp">
|
||||
|
||||
<com.kabouzeid.gramophone.views.WidthFitSquareImageView
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue