Materialized the seekBar for devices below Lollipop, seekBar visible again in landscape and fixed a common FC
This commit is contained in:
parent
2231027934
commit
713cbf2b29
5 changed files with 9 additions and 10 deletions
|
|
@ -644,7 +644,7 @@ public class MusicService extends Service implements MediaPlayer.OnPreparedListe
|
||||||
public void resumePlaying() {
|
public void resumePlaying() {
|
||||||
if (!isPlaying()) {
|
if (!isPlaying()) {
|
||||||
if (requestFocus()) {
|
if (requestFocus()) {
|
||||||
if (isPlayerPrepared) {
|
if (isPlayerPrepared()) {
|
||||||
player.start();
|
player.start();
|
||||||
playingNotificationHelper.updatePlayState(isPlaying());
|
playingNotificationHelper.updatePlayState(isPlaying());
|
||||||
MusicPlayerWidget.updateWidgetsPlayState(this, isPlaying());
|
MusicPlayerWidget.updateWidgetsPlayState(this, isPlaying());
|
||||||
|
|
@ -669,7 +669,7 @@ public class MusicService extends Service implements MediaPlayer.OnPreparedListe
|
||||||
|
|
||||||
public void back(boolean force) {
|
public void back(boolean force) {
|
||||||
if (position != -1) {
|
if (position != -1) {
|
||||||
if (getSongProgressMillis() > 2000) {
|
if (isPlayerPrepared() && getSongProgressMillis() > 2000) {
|
||||||
seekTo(0);
|
seekTo(0);
|
||||||
} else {
|
} else {
|
||||||
playPreviousSong(force);
|
playPreviousSong(force);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<solid android:color="#00000000"/>
|
|
||||||
</shape>
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||||
<size
|
<size
|
||||||
android:height="16dp"
|
android:height="12dp"
|
||||||
android:width="16dp"/>
|
android:width="12dp"/>
|
||||||
<solid
|
<solid
|
||||||
android:color="@color/materialmusic_accent_color"/>
|
android:color="@color/materialmusic_accent_color"/>
|
||||||
</shape>
|
</shape>
|
||||||
|
|
@ -207,7 +207,7 @@
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_above="@+id/footer"
|
android:layout_above="@+id/footer"
|
||||||
android:elevation="1dp"
|
android:elevation="2dp"
|
||||||
android:padding="0dp"
|
android:padding="0dp"
|
||||||
android:progressTint="@color/materialmusic_accent_color"
|
android:progressTint="@color/materialmusic_accent_color"
|
||||||
android:thumbTint="@color/materialmusic_accent_color_darker"
|
android:thumbTint="@color/materialmusic_accent_color_darker"
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,10 @@
|
||||||
<item name="android:background">?android:attr/selectableItemBackground</item>
|
<item name="android:background">?android:attr/selectableItemBackground</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="MusicProgressSlider" parent="MusicProgressSliderParent" />
|
<style name="MusicProgressSlider" parent="MusicProgressSliderParent">
|
||||||
|
<item name="android:thumbOffset">0dp</item>
|
||||||
|
<item name="android:thumb">@drawable/slider_thumb</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="Toolbar">
|
<style name="Toolbar">
|
||||||
<item name="android:layout_width">match_parent</item>
|
<item name="android:layout_width">match_parent</item>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue