From 999bd4ad9d8faa50b6d72c9c11c1e4eceb301de7 Mon Sep 17 00:00:00 2001 From: ivan agosto Date: Sun, 10 Feb 2019 13:42:29 -0600 Subject: [PATCH] Colors of nav changed --- .../agosto/p2play/ReproductorActivity.kt | 20 +++++++++---------- app/src/main/res/layout/activity_main.xml | 5 ++++- app/src/main/res/layout/nav_header_main.xml | 9 ++++++--- .../main/res/menu/activity_main_drawer.xml | 10 ++++++++-- app/src/main/res/values/colors.xml | 1 + 5 files changed, 29 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/org/libre/agosto/p2play/ReproductorActivity.kt b/app/src/main/java/org/libre/agosto/p2play/ReproductorActivity.kt index d13d7da..8b4f174 100644 --- a/app/src/main/java/org/libre/agosto/p2play/ReproductorActivity.kt +++ b/app/src/main/java/org/libre/agosto/p2play/ReproductorActivity.kt @@ -116,12 +116,12 @@ class ReproductorActivity : AppCompatActivity() { runOnUiThread { ManagerSingleton.Toast(getString(R.string.rateMsg), this) if(rate=="like"){ - likeLayout.setBackgroundColor(ContextCompat.getColor(this, R.color.colorLike)) - dislikeLayout.background = null + textViewLike.setTextColor(ContextCompat.getColor(this, R.color.colorLike)) + textViewDislike.setTextColor(ContextCompat.getColor(this, R.color.primary_dark_material_light)) } else if(rate=="dislike"){ - dislikeLayout.setBackgroundColor(ContextCompat.getColor(this, R.color.colorDislike)) - likeLayout.background = null + textViewDislike.setTextColor(ContextCompat.getColor(this, R.color.colorDislike)) + textViewLike.setTextColor(ContextCompat.getColor(this, R.color.primary_dark_material_light)) } } } @@ -136,16 +136,16 @@ class ReproductorActivity : AppCompatActivity() { runOnUiThread { when (rate){ "like" -> { - likeLayout.setBackgroundColor(ContextCompat.getColor(this, R.color.colorLike)) - dislikeLayout.background = null + textViewLike.setTextColor(ContextCompat.getColor(this, R.color.colorLike)) + textViewDislike.setTextColor(ContextCompat.getColor(this, R.color.primary_dark_material_light)) } "dislike" -> { - dislikeLayout.setBackgroundColor(ContextCompat.getColor(this, R.color.colorDislike)) - likeLayout.background = null + textViewDislike.setTextColor(ContextCompat.getColor(this, R.color.colorDislike)) + textViewLike.setTextColor(ContextCompat.getColor(this, R.color.primary_dark_material_light)) } else -> { - likeLayout.background = null - dislikeLayout.background = null + textViewLike.setTextColor(ContextCompat.getColor(this, R.color.primary_dark_material_light)) + textViewDislike.setTextColor(ContextCompat.getColor(this, R.color.primary_dark_material_light)) } } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index d4750d9..c21e1aa 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -18,7 +18,10 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" - android:background="@android:color/darker_gray" + android:background="@color/colorMenu" + app:itemTextColor="@color/colorBody" + app:itemIconTint="@android:color/darker_gray" + android:theme="@style/ThemeOverlay.AppCompat.Dark" android:fitsSystemWindows="true" app:headerLayout="@layout/nav_header_main" app:menu="@menu/activity_main_drawer" /> diff --git a/app/src/main/res/layout/nav_header_main.xml b/app/src/main/res/layout/nav_header_main.xml index 415dd63..303d7e3 100644 --- a/app/src/main/res/layout/nav_header_main.xml +++ b/app/src/main/res/layout/nav_header_main.xml @@ -3,7 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="@dimen/nav_header_height" - android:background="@android:color/holo_orange_dark" + android:background="@color/colorProfile" android:gravity="bottom" android:orientation="vertical" android:paddingLeft="@dimen/activity_horizontal_margin" @@ -25,12 +25,15 @@ android:layout_height="wrap_content" android:paddingTop="@dimen/nav_header_vertical_spacing" android:text="@string/nav_header_title" - android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + android:textAppearance="@style/TextAppearance.AppCompat.Body1" + android:textColor="@android:color/white" + android:textSize="18sp" /> + android:text="@string/nav_header_subtitle" + android:textColor="@android:color/darker_gray" /> diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml index c0390ca..9f0a1dc 100644 --- a/app/src/main/res/menu/activity_main_drawer.xml +++ b/app/src/main/res/menu/activity_main_drawer.xml @@ -3,7 +3,10 @@ xmlns:tools="http://schemas.android.com/tools" tools:showIn="navigation_view"> - + - + #000 #FF3C9100 #ec020e + #262626