From 11e988fa80047bbc78bda7f58fe8690b24ba25aa Mon Sep 17 00:00:00 2001 From: h4h13 Date: Wed, 30 Oct 2019 20:35:19 +0530 Subject: [PATCH] Fix peak theme expand color --- .../base/AbsSlidingMusicPanelActivity.kt | 4 + .../settings/MainSettingsFragment.kt | 2 +- .../layout_notification_expanded.xml | 240 +++++++++--------- .../layout/layout_notification_collapsed.xml | 6 +- .../layout/layout_notification_expanded.xml | 30 ++- .../res/layout/sliding_music_panel_layout.xml | 1 - 6 files changed, 152 insertions(+), 131 deletions(-) diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt index 71878da6..653b2f2d 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt @@ -2,6 +2,7 @@ package code.name.monkey.retromusic.activities.base import android.animation.ValueAnimator import android.annotation.SuppressLint +import android.graphics.Color import android.graphics.Rect import android.os.Bundle import android.view.MotionEvent @@ -95,6 +96,9 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), AbsPlay updateTabs() bottomSheetBehavior = BottomSheetBehavior.from(slidingPanel) + + val themeColor = ATHUtil.resolveColor(this, R.attr.colorPrimary, Color.GRAY) + dimBackground.setBackgroundColor(ColorUtil.withAlpha(themeColor, 0.5f)) } override fun onResume() { diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/settings/MainSettingsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/settings/MainSettingsFragment.kt index 2ade2e5f..bc93dfea 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/settings/MainSettingsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/settings/MainSettingsFragment.kt @@ -63,7 +63,7 @@ class MainSettingsFragment : Fragment(), View.OnClickListener { aboutSettings.setOnClickListener(this) buyProContainer.apply { - if (App.isProVersion()) show() else hide() + if (!App.isProVersion()) show() else hide() setOnClickListener { NavigationUtil.goToProVersion(requireContext()) } diff --git a/app/src/main/res/layout-v24/layout_notification_expanded.xml b/app/src/main/res/layout-v24/layout_notification_expanded.xml index 50615fab..13b84b97 100644 --- a/app/src/main/res/layout-v24/layout_notification_expanded.xml +++ b/app/src/main/res/layout-v24/layout_notification_expanded.xml @@ -5,131 +5,139 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - + - + - + - - - + + android:layout_alignParentStart="true" + android:orientation="vertical" + android:paddingStart="0dp" + android:paddingTop="8dp" + android:paddingEnd="144dp"> - + - + - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/layout_notification_collapsed.xml b/app/src/main/res/layout/layout_notification_collapsed.xml index 55c36340..9e66d97f 100644 --- a/app/src/main/res/layout/layout_notification_collapsed.xml +++ b/app/src/main/res/layout/layout_notification_collapsed.xml @@ -123,7 +123,7 @@ android:layout_height="38dp" android:scaleType="centerInside" android:src="@drawable/ic_skip_previous_round_white_32dp" - android:tint="?colorOnPrimary" /> + tools:tint="?colorOnPrimary" /> + tools:tint="?colorOnPrimary" /> + tools:tint="?colorOnPrimary" /> @@ -67,8 +67,8 @@ + android:orientation="horizontal" + android:paddingStart="8dp" + android:paddingEnd="0dp"> + android:scaleType="centerInside" + tools:src="@drawable/ic_skip_previous_round_white_32dp" + tools:tint="?colorOnPrimary" /> + android:scaleType="centerInside" + tools:src="@drawable/ic_pause_white_48dp" + tools:tint="?colorOnPrimary" /> + android:scaleType="centerInside" + tools:src="@drawable/ic_skip_next_round_white_32dp" + tools:tint="?colorOnPrimary" /> + android:scaleType="centerInside" + tools:src="@drawable/ic_close_white_24dp" + tools:tint="?colorOnPrimary" /> \ No newline at end of file diff --git a/app/src/main/res/layout/sliding_music_panel_layout.xml b/app/src/main/res/layout/sliding_music_panel_layout.xml index b4508072..386918ee 100644 --- a/app/src/main/res/layout/sliding_music_panel_layout.xml +++ b/app/src/main/res/layout/sliding_music_panel_layout.xml @@ -15,7 +15,6 @@ android:id="@+id/dimBackground" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?colorOnSecondary" android:clickable="true" android:focusable="true" android:visibility="gone" />