From 0aa59b6cb9997531c82e00af4c71661d67c4eca2 Mon Sep 17 00:00:00 2001 From: tapanmodh Date: Thu, 16 Feb 2023 12:45:11 +0530 Subject: [PATCH] brave news unfollow button style change android --- android/brave_java_resources.gni | 2 +- .../browser/settings/BraveNewsPreferencesTypeAdapter.java | 6 ++---- ...e_rounded_bg.xml => brave_news_settings_unfollow_bg.xml} | 1 + android/java/res/values/brave_colors.xml | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) rename android/java/res/drawable/{white_rounded_bg.xml => brave_news_settings_unfollow_bg.xml} (71%) diff --git a/android/brave_java_resources.gni b/android/brave_java_resources.gni index 71da9d54947c..5c6db7726b18 100644 --- a/android/brave_java_resources.gni +++ b/android/brave_java_resources.gni @@ -427,6 +427,7 @@ brave_java_resources = [ "java/res/drawable/brave_news_settings_list_divider.xml", "java/res/drawable/brave_news_settings_publisher_bg.xml", "java/res/drawable/brave_news_settings_search_bg.xml", + "java/res/drawable/brave_news_settings_unfollow_bg.xml", "java/res/drawable/brave_notification_permission_rationale_dialog_header.xml", "java/res/drawable/brave_rating_emoji_bg.xml", "java/res/drawable/brave_rating_rate_now_bg.xml", @@ -744,7 +745,6 @@ brave_java_resources = [ "java/res/drawable/wallet_toolbar_panel_gradient_bg.xml", "java/res/drawable/wallet_top_banner_bg.xml", "java/res/drawable/wallet_verify_button.xml", - "java/res/drawable/white_rounded_bg.xml", "java/res/drawable/white_rounded_holo_button_thin.xml", "java/res/drawable/yearly_selector.xml", "java/res/font/poppins_300.ttf", diff --git a/android/java/org/chromium/chrome/browser/settings/BraveNewsPreferencesTypeAdapter.java b/android/java/org/chromium/chrome/browser/settings/BraveNewsPreferencesTypeAdapter.java index d3e9762abea0..b5674ca0b014 100644 --- a/android/java/org/chromium/chrome/browser/settings/BraveNewsPreferencesTypeAdapter.java +++ b/android/java/org/chromium/chrome/browser/settings/BraveNewsPreferencesTypeAdapter.java @@ -347,13 +347,11 @@ private void setChannel(int position, NewsPreferencesViewHolder viewHolder, Chan private void displayFollowButton( boolean isFollowing, int textId, NewsPreferencesViewHolder holder) { if (isFollowing) { - holder.btnFollow.setBackgroundResource(R.drawable.white_rounded_bg); - holder.btnFollow.setElevation(2f); + holder.btnFollow.setBackgroundResource(R.drawable.brave_news_settings_unfollow_bg); holder.btnText.setTextColor( - ContextCompat.getColor(mContext, R.color.news_settings_subtitle_color)); + ContextCompat.getColor(mContext, R.color.news_settings_unfollow_color)); } else { holder.btnFollow.setBackgroundResource(R.drawable.blue_48_rounded_bg); - holder.btnFollow.setElevation(0f); holder.btnText.setTextColor(ContextCompat.getColor(mContext, android.R.color.white)); } diff --git a/android/java/res/drawable/white_rounded_bg.xml b/android/java/res/drawable/brave_news_settings_unfollow_bg.xml similarity index 71% rename from android/java/res/drawable/white_rounded_bg.xml rename to android/java/res/drawable/brave_news_settings_unfollow_bg.xml index 576395a1da00..fef3358ca147 100644 --- a/android/java/res/drawable/white_rounded_bg.xml +++ b/android/java/res/drawable/brave_news_settings_unfollow_bg.xml @@ -2,5 +2,6 @@ + diff --git a/android/java/res/values/brave_colors.xml b/android/java/res/values/brave_colors.xml index f3806147586b..6e49c3d0171c 100644 --- a/android/java/res/values/brave_colors.xml +++ b/android/java/res/values/brave_colors.xml @@ -110,6 +110,7 @@ #1A000000 #CCCCCC #4C54D2 + #4C54D2 @color/incognito_modern_primary_color