Redesigned widget (#225)

* Changed widget layout, added vibrant color support for button

* Added preview image. Show also albums name after artists name

* Updated also small widget with vibrant color support. Added preview images for small and big widgets

* Fixed wrong height

* Revert classic widget padding, update preview image

* Replaced dash with dot, changed background color, show the album name also on big widget.

* Updated preview images, switched to jpg

* Fixed dot instead of dash for small widget

* Changed ripple color for white background

* Dark ripple for big widget

* Standardize layout

* Fix image resizing

* Improve image resizing

* Fix for songs without album art

* Set centerCrop for albums art

* Card layout for small widget

* Updated preview images

* Fix incorrectly rounded corner
This commit is contained in:
Materight 2017-08-03 01:05:33 +02:00 committed by Eugene Cheung
commit 0377e43475
19 changed files with 132 additions and 101 deletions

View file

@ -3,17 +3,19 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="@dimen/app_widget_classic_height"
android:background="#AA000000"
android:layout_height="match_parent"
android:background="@drawable/card"
android:orientation="horizontal"
tools:ignore="ContentDescription">
<ImageView
android:id="@+id/image"
android:layout_width="@dimen/app_widget_classic_image_size"
android:layout_height="@dimen/app_widget_classic_image_size"
android:background="@drawable/default_album_art"
android:scaleType="centerCrop" />
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
tools:ignore="ContentDescription"
tools:src="@drawable/default_album_art" />
<RelativeLayout
android:layout_width="match_parent"
@ -23,70 +25,72 @@
android:id="@+id/media_actions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:layoutDirection="ltr"
android:orientation="horizontal"
android:padding="8dp">
android:layout_marginBottom="8dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<ImageButton
android:id="@+id/button_prev"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/widget_selector"
android:background="@drawable/widget_selector_light"
tools:src="@drawable/ic_skip_previous_white_24dp"
tools:tint="@color/ate_secondary_text_dark" />
tools:tint="@color/ate_secondary_text_light" />
<ImageButton
android:id="@+id/button_toggle_play_pause"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/widget_selector"
android:background="@drawable/widget_selector_light"
tools:src="@drawable/ic_play_arrow_white_24dp"
tools:tint="@color/ate_secondary_text_dark" />
tools:tint="@color/ate_secondary_text_light" />
<ImageButton
android:id="@+id/button_next"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/widget_selector"
android:background="@drawable/widget_selector_light"
tools:src="@drawable/ic_skip_next_white_24dp"
tools:tint="@color/ate_secondary_text_dark" />
tools:tint="@color/ate_secondary_text_light" />
</LinearLayout>
<LinearLayout
android:id="@+id/media_titles"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/media_actions"
android:layout_alignParentTop="true"
android:orientation="vertical"
android:padding="8dp">
android:gravity="center"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="@color/ate_primary_text_dark"
android:textColor="@color/ate_primary_text_light"
tools:text="Title" />
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
android:textColor="@color/ate_secondary_text_dark"
android:textColor="@color/ate_secondary_text_light"
tools:text="Text" />
</LinearLayout>