Redesign Now Playing panel to make it fit the rest of the app look. Substitute png icons for svg ones.

This commit is contained in:
Synced Synapse 2017-07-18 19:57:04 +01:00
parent 48529fa0c4
commit 859ad66424
79 changed files with 183 additions and 37 deletions

View File

@ -518,8 +518,8 @@ public abstract class BaseMediaActivity extends BaseActivity
}
Resources resources = getResources();
int posterWidth = resources.getDimensionPixelOffset(R.dimen.notification_art_slim_width);
int posterHeight = resources.getDimensionPixelOffset(R.dimen.notification_art_slim_height);
int posterWidth = resources.getDimensionPixelOffset(R.dimen.now_playing_panel_art_width);
int posterHeight = resources.getDimensionPixelOffset(R.dimen.now_playing_panel_art_height);
// If not video, change aspect ration of poster to a square
boolean isVideo = (getItemResult.type.equals(ListType.ItemsAll.TYPE_MOVIE)) ||

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 B

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M19,4L5,4c-1.11,0 -2,0.9 -2,2v12c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,6c0,-1.1 -0.9,-2 -2,-2zM11,11L9.5,11v-0.5h-2v3h2L9.5,13L11,13v1c0,0.55 -0.45,1 -1,1L7,15c-0.55,0 -1,-0.45 -1,-1v-4c0,-0.55 0.45,-1 1,-1h3c0.55,0 1,0.45 1,1v1zM18,11h-1.5v-0.5h-2v3h2L16.5,13L18,13v1c0,0.55 -0.45,1 -1,1h-3c-0.55,0 -1,-0.45 -1,-1v-4c0,-0.55 0.45,-1 1,-1h3c0.55,0 1,0.45 1,1v1z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M11,18L11,6l-8.5,6 8.5,6zM11.5,12l8.5,6L20,6l-8.5,6z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M8,5v14l11,-7z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4zM13,15L13,9h-1l-2,1v1h1.5v4L13,15z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M10.59,9.17L5.41,4 4,5.41l5.17,5.17 1.42,-1.41zM14.5,4l2.04,2.04L4,18.59 5.41,20 17.96,7.46 20,9.5L20,4h-5.5zM14.83,13.41l-1.41,1.41 3.13,3.13L14.5,20L20,20v-5.5l-2.04,2.04 -3.13,-3.13z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M6,6h12v12H6z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M18.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM5,9v6h4l5,5V4L9,9H5z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v2.21l2.45,2.45c0.03,-0.2 0.05,-0.41 0.05,-0.63zM19,12c0,0.94 -0.2,1.82 -0.54,2.64l1.51,1.51C20.63,14.91 21,13.5 21,12c0,-4.28 -2.99,-7.86 -7,-8.77v2.06c2.89,0.86 5,3.54 5,6.71zM4.27,3L3,4.27 7.73,9L3,9v6h4l5,5v-6.73l4.25,4.25c-0.67,0.52 -1.42,0.93 -2.25,1.18v2.06c1.38,-0.31 2.63,-0.95 3.69,-1.81L19.73,21 21,19.73l-9,-9L4.27,3zM12,4L9.91,6.09 12,8.18L12,4z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z"/>
</vector>

View File

@ -35,7 +35,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:umanoPanelHeight="@dimen/notification_art_slim_height"
sothree:umanoPanelHeight="@dimen/now_playing_panel_height"
sothree:umanoShadowHeight="4dp"
sothree:umanoFadeColor="#00000000"
sothree:umanoInitialState="hidden"/>

View File

@ -67,7 +67,7 @@
<ImageButton
android:id="@+id/rewind"
style="@style/Widget.Button.Borderless"
style="@style/Widget.Button.Notification"
android:layout_width="@dimen/default_icon_size"
android:layout_height="match_parent"
android:layout_marginLeft="2dp"
@ -77,7 +77,7 @@
android:contentDescription="@string/rewind"/>
<ImageButton
android:id="@+id/play"
style="@style/Widget.Button.Borderless"
style="@style/Widget.Button.Notification"
android:layout_width="@dimen/default_icon_size"
android:layout_height="match_parent"
android:layout_marginLeft="2dp"
@ -87,7 +87,7 @@
android:contentDescription="@string/play"/>
<ImageButton
android:id="@+id/fast_forward"
style="@style/Widget.Button.Borderless"
style="@style/Widget.Button.Notification"
android:layout_width="@dimen/default_icon_size"
android:layout_height="match_parent"
android:layout_marginLeft="2dp"

View File

@ -187,7 +187,7 @@
<ImageButton
android:id="@+id/rewind"
style="@style/Widget.Button.Borderless"
style="@style/Widget.Button.Notification"
android:layout_width="@dimen/default_icon_size"
android:layout_height="match_parent"
android:layout_marginLeft="2dp"
@ -197,7 +197,7 @@
android:contentDescription="@string/rewind"/>
<ImageButton
android:id="@+id/play"
style="@style/Widget.Button.Borderless"
style="@style/Widget.Button.Notification"
android:layout_width="@dimen/default_icon_size"
android:layout_height="match_parent"
android:layout_marginLeft="2dp"
@ -207,7 +207,7 @@
android:contentDescription="@string/play"/>
<ImageButton
android:id="@+id/fast_forward"
style="@style/Widget.Button.Borderless"
style="@style/Widget.Button.Notification"
android:layout_width="@dimen/default_icon_size"
android:layout_height="match_parent"
android:layout_marginLeft="2dp"

View File

@ -29,19 +29,20 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="?attr/colorPrimaryDark">
android:background="?attr/colorPrimary">
<ImageView android:id="@+id/npp_poster"
android:layout_width="@dimen/notification_art_slim_width"
android:layout_height="@dimen/notification_art_slim_height"
android:layout_width="@dimen/now_playing_panel_art_width"
android:layout_height="@dimen/now_playing_panel_art_height"
android:layout_weight="0"
android:scaleType="centerInside"
android:contentDescription="@string/poster"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="@dimen/notification_art_slim_height"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<TextView
android:id="@+id/npp_title"
@ -69,8 +70,9 @@
</LinearLayout>
<org.xbmc.kore.ui.widgets.HighlightButton
android:id="@+id/npp_volume_muted_indicator"
android:layout_width="@dimen/notification_art_slim_height"
android:layout_height="@dimen/notification_art_slim_height"
android:layout_width="@dimen/default_icon_size"
android:layout_height="@dimen/default_icon_size"
android:layout_gravity="center_vertical"
style="@style/Widget.Button.Borderless"
android:src="?attr/iconVolumeMute"
android:contentDescription="@string/volume_mute"
@ -78,25 +80,31 @@
<ImageButton
android:id="@+id/npp_previous"
android:layout_width="@dimen/notification_art_slim_height"
android:layout_height="@dimen/notification_art_slim_height"
android:layout_width="@dimen/default_icon_size"
android:layout_height="@dimen/default_icon_size"
android:layout_gravity="center_vertical"
style="@style/Widget.Button.Borderless"
android:tint="?attr/buttonColorOverPrimary"
android:src="?attr/iconPrevious"
android:contentDescription="@string/previous"/>
<ImageButton
android:id="@+id/npp_play"
android:layout_width="@dimen/notification_art_slim_height"
android:layout_height="@dimen/notification_art_slim_height"
android:layout_width="@dimen/default_icon_size"
android:layout_height="@dimen/default_icon_size"
android:layout_gravity="center_vertical"
style="@style/Widget.Button.Borderless"
android:tint="?attr/buttonColorOverPrimary"
android:src="?attr/iconPlay"
android:contentDescription="@string/play"/>
<ImageButton
android:id="@+id/npp_next"
android:layout_width="@dimen/notification_art_slim_height"
android:layout_height="@dimen/notification_art_slim_height"
android:layout_width="@dimen/default_icon_size"
android:layout_height="@dimen/default_icon_size"
android:layout_gravity="center_vertical"
style="@style/Widget.Button.Borderless"
android:tint="?attr/buttonColorOverPrimary"
android:src="?attr/iconNext"
android:contentDescription="@string/next"/>
</LinearLayout>

View File

@ -19,6 +19,7 @@
<attr name="appTextColorSecondary" format="reference|color" />
<attr name="textColorOverPrimary" format="reference|color" />
<attr name="buttonColorOverPrimary" format="reference|color" />
<attr name="colorAccentLight" format="reference|color" />

View File

@ -128,11 +128,14 @@
<dimen name="notification_expanded_height">128dp</dimen>
<dimen name="notification_art_default_height">64dp</dimen>
<dimen name="notification_art_default_width">64dp</dimen>
<dimen name="notification_art_slim_width">31dp</dimen>
<dimen name="notification_art_slim_height">44dp</dimen>
<dimen name="notification_expanded_art_default_height">128dp</dimen>
<dimen name="notification_expanded_art_default_width">128dp</dimen>
<dimen name="notification_expanded_art_slim_width">88dp</dimen>
<dimen name="now_playing_panel_height">64dp</dimen>
<dimen name="now_playing_panel_art_width">48dp</dimen>
<dimen name="now_playing_panel_art_height">64dp</dimen>
</resources>

View File

@ -33,9 +33,15 @@
<style name="Widget.Button">
</style>
<style name="Widget.Button.Notification">
<item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:textAppearance">@style/TextAppearance.AppCompat.Button</item>
</style>
<style name="Widget.Button.Borderless">
<item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:textAppearance">@style/TextAppearance.AppCompat.Button</item>
<item name="android:tint">?attr/defaultButtonColorFilter</item>
</style>
<style name="Widget.GridView">

View File

@ -53,6 +53,7 @@
<item name="appTextColorSecondary">@color/white_dim_50pct</item>
<item name="textColorOverPrimary">@color/white</item>
<item name="buttonColorOverPrimary">@color/white</item>
<item name="fabColorNormal">?attr/colorPrimary</item>
<item name="fabColorPressed">?attr/colorPrimaryDark</item>
@ -175,6 +176,7 @@
<item name="appTextColorSecondary">@color/black_dim_54pct</item>
<item name="textColorOverPrimary">@color/white</item>
<item name="buttonColorOverPrimary">@color/white</item>
<item name="fabColorNormal">?attr/colorPrimary</item>
<item name="fabColorPressed">?attr/colorPrimaryDark</item>
@ -243,22 +245,22 @@
<item name="iconSettings">@drawable/ic_settings_white_24dp</item>
<item name="iconPlay">@drawable/ic_play_arrow_black_24dp</item>
<item name="iconPause">@drawable/ic_pause_black_24dp</item>
<item name="iconStop">@drawable/ic_stop_black_24dp</item>
<item name="iconFastForward">@drawable/ic_fast_forward_black_24dp</item>
<item name="iconRewind">@drawable/ic_fast_rewind_black_24dp</item>
<item name="iconNext">@drawable/ic_skip_next_black_24dp</item>
<item name="iconPrevious">@drawable/ic_skip_previous_black_24dp</item>
<item name="iconPlay">@drawable/ic_play_arrow_white_24dp</item>
<item name="iconPause">@drawable/ic_pause_white_24dp</item>
<item name="iconStop">@drawable/ic_stop_white_24dp</item>
<item name="iconFastForward">@drawable/ic_fast_forward_white_24dp</item>
<item name="iconRewind">@drawable/ic_fast_rewind_white_24dp</item>
<item name="iconNext">@drawable/ic_skip_next_white_24dp</item>
<item name="iconPrevious">@drawable/ic_skip_previous_white_24dp</item>
<item name="iconVolumeUp">@drawable/ic_volume_up_black_24dp</item>
<item name="iconVolumeDown">@drawable/ic_volume_down_black_24dp</item>
<item name="iconRepeat">@drawable/ic_repeat_black_24dp</item>
<item name="iconRepeatOne">@drawable/ic_repeat_one_black_24dp</item>
<item name="iconShuffle">@drawable/ic_shuffle_black_24dp</item>
<item name="iconVolumeMute">@drawable/ic_volume_off_black_24dp</item>
<item name="iconVolumeUp">@drawable/ic_volume_up_white_24dp</item>
<item name="iconVolumeDown">@drawable/ic_volume_down_white_24dp</item>
<item name="iconRepeat">@drawable/ic_repeat_white_24dp</item>
<item name="iconRepeatOne">@drawable/ic_repeat_one_white_24dp</item>
<item name="iconShuffle">@drawable/ic_shuffle_white_24dp</item>
<item name="iconVolumeMute">@drawable/ic_volume_off_white_24dp</item>
<item name="iconSubtitles">@drawable/ic_closed_caption_black_24dp</item>
<item name="iconSubtitles">@drawable/ic_closed_caption_white_24dp</item>
<item name="iconOverflow">@drawable/ic_more_vert_black_24dp</item>