diff --git a/app/build.gradle b/app/build.gradle index 39fdaa7b..c3262873 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,8 +23,8 @@ android { applicationId "com.kabouzeid.gramophone" minSdkVersion 16 targetSdkVersion 22 - versionCode 9 - versionName "0.9.5b" + versionCode 10 + versionName "0.9.6b" } compileOptions { diff --git a/app/src/main/java/com/kabouzeid/gramophone/ui/activities/base/AbsFabActivity.java b/app/src/main/java/com/kabouzeid/gramophone/ui/activities/base/AbsFabActivity.java index b22f6a36..9ca842f5 100644 --- a/app/src/main/java/com/kabouzeid/gramophone/ui/activities/base/AbsFabActivity.java +++ b/app/src/main/java/com/kabouzeid/gramophone/ui/activities/base/AbsFabActivity.java @@ -1,5 +1,6 @@ package com.kabouzeid.gramophone.ui.activities.base; +import android.os.Build; import android.os.Bundle; import android.support.v4.util.Pair; import android.util.Log; @@ -41,6 +42,9 @@ public abstract class AbsFabActivity extends AbsBaseActivity { } private void setUpFab() { + if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){ + getFab().setImageResource(R.drawable.ic_pause_resume); + } updateFabState(); final GestureDetector gestureDetector = new GestureDetector(this, new SmallOnGestureListener() { @Override @@ -76,9 +80,9 @@ public abstract class AbsFabActivity extends AbsBaseActivity { private void updateFabState() { if (MusicPlayerRemote.isPlaying()) { - getFab().setImageResource(R.drawable.ic_pause_white_24dp); + setFabPause(); } else { - getFab().setImageResource(R.drawable.ic_play_arrow_white_24dp); + setFabPlay(); } } @@ -141,20 +145,34 @@ public abstract class AbsFabActivity extends AbsBaseActivity { public void onMusicRemoteEvent(MusicRemoteEvent event) { switch (event.getAction()) { case MusicRemoteEvent.PLAY: - getFab().setImageDrawable(getResources().getDrawable(R.drawable.ic_pause_white_24dp)); + setFabPause(); break; case MusicRemoteEvent.PAUSE: - getFab().setImageDrawable(getResources().getDrawable(R.drawable.ic_play_arrow_white_24dp)); + setFabPlay(); break; case MusicRemoteEvent.RESUME: - getFab().setImageDrawable(getResources().getDrawable(R.drawable.ic_pause_white_24dp)); + setFabPause(); break; case MusicRemoteEvent.STOP: - getFab().setImageDrawable(getResources().getDrawable(R.drawable.ic_play_arrow_white_24dp)); + setFabPlay(); break; case MusicRemoteEvent.QUEUE_COMPLETED: - getFab().setImageResource(R.drawable.ic_play_arrow_white_24dp); + setFabPlay(); break; } } + + private void setFabPlay(){ + getFab().setSelected(true); + if(Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP){ + getFab().setImageResource(R.drawable.ic_play_arrow_white_24dp); + } + } + + private void setFabPause(){ + getFab().setSelected(false); + if(Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP){ + getFab().setImageResource(R.drawable.ic_pause_white_24dp); + } + } } diff --git a/app/src/main/res/anim/drawable_pause_to_resume_group.xml b/app/src/main/res/anim/drawable_pause_to_resume_group.xml new file mode 100644 index 00000000..339f3a51 --- /dev/null +++ b/app/src/main/res/anim/drawable_pause_to_resume_group.xml @@ -0,0 +1,8 @@ + + + + diff --git a/app/src/main/res/anim/drawable_pause_to_resume_left.xml b/app/src/main/res/anim/drawable_pause_to_resume_left.xml new file mode 100644 index 00000000..b9863007 --- /dev/null +++ b/app/src/main/res/anim/drawable_pause_to_resume_left.xml @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/app/src/main/res/anim/drawable_pause_to_resume_right.xml b/app/src/main/res/anim/drawable_pause_to_resume_right.xml new file mode 100644 index 00000000..45212d5f --- /dev/null +++ b/app/src/main/res/anim/drawable_pause_to_resume_right.xml @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/app/src/main/res/anim/drawable_resume_to_pause_group.xml b/app/src/main/res/anim/drawable_resume_to_pause_group.xml new file mode 100644 index 00000000..13acbf51 --- /dev/null +++ b/app/src/main/res/anim/drawable_resume_to_pause_group.xml @@ -0,0 +1,8 @@ + + + + diff --git a/app/src/main/res/anim/drawable_resume_to_pause_left.xml b/app/src/main/res/anim/drawable_resume_to_pause_left.xml new file mode 100644 index 00000000..a18e9e5e --- /dev/null +++ b/app/src/main/res/anim/drawable_resume_to_pause_left.xml @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/app/src/main/res/anim/drawable_resume_to_pause_right.xml b/app/src/main/res/anim/drawable_resume_to_pause_right.xml new file mode 100644 index 00000000..f90cf80f --- /dev/null +++ b/app/src/main/res/anim/drawable_resume_to_pause_right.xml @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/app/src/main/res/drawable-v21/ic_pause.xml b/app/src/main/res/drawable-v21/ic_pause.xml new file mode 100644 index 00000000..f01e59e2 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_pause.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-v21/ic_pause_resume.xml b/app/src/main/res/drawable-v21/ic_pause_resume.xml new file mode 100644 index 00000000..206ea501 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_pause_resume.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable-v21/ic_pause_to_ic_resume.xml b/app/src/main/res/drawable-v21/ic_pause_to_ic_resume.xml new file mode 100644 index 00000000..20685157 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_pause_to_ic_resume.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-v21/ic_resume.xml b/app/src/main/res/drawable-v21/ic_resume.xml new file mode 100644 index 00000000..aa07191b --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_resume.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-v21/ic_resume_to_ic_pause.xml b/app/src/main/res/drawable-v21/ic_resume_to_ic_pause.xml new file mode 100644 index 00000000..19c52455 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_resume_to_ic_pause.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_grid_artist_album.xml b/app/src/main/res/layout/item_grid_artist_album.xml index 93040f87..1a890b23 100644 --- a/app/src/main/res/layout/item_grid_artist_album.xml +++ b/app/src/main/res/layout/item_grid_artist_album.xml @@ -24,7 +24,7 @@ android:id="@+id/footer" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?default_bar_color"> + android:background="?card_color"> + diff --git a/app/src/main/res/values/strings_constants.xml b/app/src/main/res/values/strings_constants.xml new file mode 100644 index 00000000..53c6d469 --- /dev/null +++ b/app/src/main/res/values/strings_constants.xml @@ -0,0 +1,7 @@ + + + M6,5 l4,0 0,14 -4,0 z + M14,5 l4,0 0,14 -4,0 z + M12,5 l0,0 0,11 -7,0 z + M12,5 l0,0 7,11 -7,0 z + \ No newline at end of file diff --git a/app/src/main/res/values/styles_parents.xml b/app/src/main/res/values/styles_parents.xml index 62fcad29..b2466f6e 100644 --- a/app/src/main/res/values/styles_parents.xml +++ b/app/src/main/res/values/styles_parents.xml @@ -27,6 +27,7 @@ @color/materialmusic_dark_themed_drawable_activated_color @color/materialmusic_dark_default_bar_color + @color/materialmusic_dark_default_bar_color @style/ThemeOverlay.AppCompat @@ -60,6 +61,7 @@ @color/materialmusic_themed_drawable_activated_color @color/materialmusic_default_bar_color + @color/white @style/ThemeOverlay.AppCompat.Light