diff --git a/mobile/mobile.iml b/mobile/mobile.iml index 5c43a103b..cf74eac9a 100644 --- a/mobile/mobile.iml +++ b/mobile/mobile.iml @@ -86,14 +86,14 @@ - + + + - + - - diff --git a/mobile/src/main/java/com/example/android/uamp/ui/MediaItemViewHolder.java b/mobile/src/main/java/com/example/android/uamp/ui/MediaItemViewHolder.java index b9f10dac0..b55ff45c0 100644 --- a/mobile/src/main/java/com/example/android/uamp/ui/MediaItemViewHolder.java +++ b/mobile/src/main/java/com/example/android/uamp/ui/MediaItemViewHolder.java @@ -16,6 +16,8 @@ package com.example.android.uamp.ui; import android.app.Activity; +import android.content.Context; +import android.content.res.ColorStateList; import android.graphics.drawable.AnimationDrawable; import android.media.MediaDescription; import android.view.LayoutInflater; @@ -34,12 +36,20 @@ public class MediaItemViewHolder { static final int STATE_PAUSED = 2; static final int STATE_PLAYING = 3; + private static ColorStateList sColorStatePlaying; + private static ColorStateList sColorStateNotPlaying; + ImageView mImageView; TextView mTitleView; TextView mDescriptionView; static View setupView(Activity activity, View convertView, ViewGroup parent, MediaDescription description, int state) { + + if (sColorStateNotPlaying == null || sColorStatePlaying == null) { + initializeColorStateLists(activity); + } + MediaItemViewHolder holder; Integer cachedState = STATE_INVALID; @@ -66,19 +76,22 @@ static View setupView(Activity activity, View convertView, ViewGroup parent, switch (state) { case STATE_PLAYABLE: holder.mImageView.setImageDrawable( - activity.getDrawable(R.drawable.ic_play_arrow_white_24dp)); + activity.getDrawable(R.drawable.ic_play_arrow_black_36dp)); + holder.mImageView.setImageTintList(sColorStateNotPlaying); holder.mImageView.setVisibility(View.VISIBLE); break; case STATE_PLAYING: AnimationDrawable animation = (AnimationDrawable) - activity.getDrawable(R.drawable.ic_equalizer_white_24dp); + activity.getDrawable(R.drawable.ic_equalizer_white_36dp); holder.mImageView.setImageDrawable(animation); + holder.mImageView.setImageTintList(sColorStatePlaying); holder.mImageView.setVisibility(View.VISIBLE); animation.start(); break; case STATE_PAUSED: holder.mImageView.setImageDrawable( - activity.getDrawable(R.drawable.ic_equalizer1_white_24dp)); + activity.getDrawable(R.drawable.ic_equalizer1_white_36dp)); + holder.mImageView.setImageTintList(sColorStateNotPlaying); holder.mImageView.setVisibility(View.VISIBLE); break; default: @@ -90,4 +103,10 @@ static View setupView(Activity activity, View convertView, ViewGroup parent, return convertView; } + static private void initializeColorStateLists(Context ctx) { + sColorStateNotPlaying = ColorStateList.valueOf(ctx.getResources().getColor( + R.color.media_item_icon_not_playing)); + sColorStatePlaying = ColorStateList.valueOf(ctx.getResources().getColor( + R.color.media_item_icon_playing)); + } } diff --git a/mobile/src/main/res/drawable-hdpi/ic_equalizer1_white_36dp.png b/mobile/src/main/res/drawable-hdpi/ic_equalizer1_white_36dp.png new file mode 100644 index 000000000..7f01800d6 Binary files /dev/null and b/mobile/src/main/res/drawable-hdpi/ic_equalizer1_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-hdpi/ic_equalizer2_white_36dp.png b/mobile/src/main/res/drawable-hdpi/ic_equalizer2_white_36dp.png new file mode 100644 index 000000000..7d6461c9d Binary files /dev/null and b/mobile/src/main/res/drawable-hdpi/ic_equalizer2_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-hdpi/ic_equalizer3_white_36dp.png b/mobile/src/main/res/drawable-hdpi/ic_equalizer3_white_36dp.png new file mode 100644 index 000000000..56bd21c11 Binary files /dev/null and b/mobile/src/main/res/drawable-hdpi/ic_equalizer3_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-hdpi/ic_equalizer1_white_24dp.png b/mobile/src/main/res/drawable-mdpi/ic_equalizer1_white_36dp.png similarity index 100% rename from mobile/src/main/res/drawable-hdpi/ic_equalizer1_white_24dp.png rename to mobile/src/main/res/drawable-mdpi/ic_equalizer1_white_36dp.png diff --git a/mobile/src/main/res/drawable-mdpi/ic_equalizer2_white_36dp.png b/mobile/src/main/res/drawable-mdpi/ic_equalizer2_white_36dp.png new file mode 100644 index 000000000..d3d431176 Binary files /dev/null and b/mobile/src/main/res/drawable-mdpi/ic_equalizer2_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-mdpi/ic_equalizer3_white_36dp.png b/mobile/src/main/res/drawable-mdpi/ic_equalizer3_white_36dp.png new file mode 100644 index 000000000..b24c88a53 Binary files /dev/null and b/mobile/src/main/res/drawable-mdpi/ic_equalizer3_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-xhdpi/ic_equalizer1_white_24dp.png b/mobile/src/main/res/drawable-xhdpi/ic_equalizer1_white_24dp.png deleted file mode 100644 index 4b069ce3b..000000000 Binary files a/mobile/src/main/res/drawable-xhdpi/ic_equalizer1_white_24dp.png and /dev/null differ diff --git a/mobile/src/main/res/drawable-xxhdpi/ic_equalizer1_white_24dp.png b/mobile/src/main/res/drawable-xhdpi/ic_equalizer1_white_36dp.png similarity index 72% rename from mobile/src/main/res/drawable-xxhdpi/ic_equalizer1_white_24dp.png rename to mobile/src/main/res/drawable-xhdpi/ic_equalizer1_white_36dp.png index f4443ecd9..29c62fad5 100644 Binary files a/mobile/src/main/res/drawable-xxhdpi/ic_equalizer1_white_24dp.png and b/mobile/src/main/res/drawable-xhdpi/ic_equalizer1_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-xhdpi/ic_equalizer2_white_36dp.png b/mobile/src/main/res/drawable-xhdpi/ic_equalizer2_white_36dp.png new file mode 100644 index 000000000..1ee6b4117 Binary files /dev/null and b/mobile/src/main/res/drawable-xhdpi/ic_equalizer2_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-xhdpi/ic_equalizer3_white_36dp.png b/mobile/src/main/res/drawable-xhdpi/ic_equalizer3_white_36dp.png new file mode 100644 index 000000000..94801cd42 Binary files /dev/null and b/mobile/src/main/res/drawable-xhdpi/ic_equalizer3_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-xxhdpi/ic_equalizer1_white_36dp.png b/mobile/src/main/res/drawable-xxhdpi/ic_equalizer1_white_36dp.png new file mode 100644 index 000000000..2511de32b Binary files /dev/null and b/mobile/src/main/res/drawable-xxhdpi/ic_equalizer1_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-xxhdpi/ic_equalizer2_white_36dp.png b/mobile/src/main/res/drawable-xxhdpi/ic_equalizer2_white_36dp.png new file mode 100644 index 000000000..9db0af433 Binary files /dev/null and b/mobile/src/main/res/drawable-xxhdpi/ic_equalizer2_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-xxhdpi/ic_equalizer3_white_36dp.png b/mobile/src/main/res/drawable-xxhdpi/ic_equalizer3_white_36dp.png new file mode 100644 index 000000000..d0f3c3859 Binary files /dev/null and b/mobile/src/main/res/drawable-xxhdpi/ic_equalizer3_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-xxxhdpi/ic_equalizer1_white_36dp.png b/mobile/src/main/res/drawable-xxxhdpi/ic_equalizer1_white_36dp.png new file mode 100644 index 000000000..311ee666b Binary files /dev/null and b/mobile/src/main/res/drawable-xxxhdpi/ic_equalizer1_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-xxxhdpi/ic_equalizer2_white_36dp.png b/mobile/src/main/res/drawable-xxxhdpi/ic_equalizer2_white_36dp.png new file mode 100644 index 000000000..ca24633ce Binary files /dev/null and b/mobile/src/main/res/drawable-xxxhdpi/ic_equalizer2_white_36dp.png differ diff --git a/mobile/src/main/res/drawable-xxxhdpi/ic_equalizer3_white_36dp.png b/mobile/src/main/res/drawable-xxxhdpi/ic_equalizer3_white_36dp.png new file mode 100644 index 000000000..d77eb1aec Binary files /dev/null and b/mobile/src/main/res/drawable-xxxhdpi/ic_equalizer3_white_36dp.png differ diff --git a/mobile/src/main/res/drawable/ic_equalizer_white_24dp.xml b/mobile/src/main/res/drawable/ic_equalizer_white_36dp.xml similarity index 79% rename from mobile/src/main/res/drawable/ic_equalizer_white_24dp.xml rename to mobile/src/main/res/drawable/ic_equalizer_white_36dp.xml index 475a6783f..42b62570c 100644 --- a/mobile/src/main/res/drawable/ic_equalizer_white_24dp.xml +++ b/mobile/src/main/res/drawable/ic_equalizer_white_36dp.xml @@ -15,7 +15,7 @@ limitations under the License. --> - - - - \ No newline at end of file + + + + diff --git a/mobile/src/main/res/layout/fragment_playback_controls.xml b/mobile/src/main/res/layout/fragment_playback_controls.xml index 0147f8ade..018ca48e1 100644 --- a/mobile/src/main/res/layout/fragment_playback_controls.xml +++ b/mobile/src/main/res/layout/fragment_playback_controls.xml @@ -21,8 +21,8 @@ @@ -30,7 +30,7 @@ android:id="@+id/content" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/horizontal_margin_around_albumart" + android:layout_marginStart="@dimen/playback_controls_albumart_horizontal_margin" android:orientation="vertical" android:layout_toEndOf="@id/album_art" android:layout_toStartOf="@+id/play_pause" diff --git a/mobile/src/main/res/layout/include_toolbar.xml b/mobile/src/main/res/layout/include_toolbar.xml index b1ac0a35c..910a47332 100644 --- a/mobile/src/main/res/layout/include_toolbar.xml +++ b/mobile/src/main/res/layout/include_toolbar.xml @@ -19,6 +19,7 @@ android:layout_height="?attr/actionBarSize" android:layout_alignParentStart="true" android:layout_alignParentTop="true" + android:contentInsetStart="@dimen/toolbar_inset_start" android:background="?attr/colorPrimary" android:popupTheme="@style/ThemeOverlay.AppCompat.Light" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/> diff --git a/mobile/src/main/res/layout/media_list_item.xml b/mobile/src/main/res/layout/media_list_item.xml index 00ea7894b..9060b63f8 100644 --- a/mobile/src/main/res/layout/media_list_item.xml +++ b/mobile/src/main/res/layout/media_list_item.xml @@ -13,29 +13,29 @@ See the License for the specific language governing permissions and limitations under the License. --> - + android:layout_height="@dimen/media_item_height"> + android:src="@drawable/ic_play_arrow_black_36dp"/> - + diff --git a/mobile/src/main/res/values-h800dp/dimens.xml b/mobile/src/main/res/values-h800dp/dimens.xml new file mode 100644 index 000000000..9609a46a0 --- /dev/null +++ b/mobile/src/main/res/values-h800dp/dimens.xml @@ -0,0 +1,20 @@ + + + + + 96dp + diff --git a/mobile/src/main/res/values/colors.xml b/mobile/src/main/res/values/colors.xml index 3b1ad80c5..deabf388b 100644 --- a/mobile/src/main/res/values/colors.xml +++ b/mobile/src/main/res/values/colors.xml @@ -1,4 +1,21 @@ + #00B8D4 + @color/bt_accent + #ccc \ No newline at end of file diff --git a/mobile/src/main/res/values/dimens.xml b/mobile/src/main/res/values/dimens.xml index c4828cff6..b75ec9849 100644 --- a/mobile/src/main/res/values/dimens.xml +++ b/mobile/src/main/res/values/dimens.xml @@ -15,18 +15,24 @@ limitations under the License. --> - + 4dp 16dp - 4dp - 6dp - 8dp - 64dp + + + 8dp + 64dp 8dp + 12dp 16dp 56dp 48dp + + 72dp + 12dp + 60dp + 60dp