Skip to content

Commit

Permalink
Merge pull request #17255 from brave/brave_news_unfollow_button_style…
Browse files Browse the repository at this point in the history
…_change_android

[Android] brave news unfollow button style change
  • Loading branch information
tapanmodh authored Feb 16, 2023
2 parents e0155b0 + 0aa59b6 commit 09b18ce
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion android/brave_java_resources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#FFFFFF" />
<stroke android:color="@color/news_settings_unfollow_color" android:width="1dp"/>
<corners android:radius="48dp" />
</shape>
1 change: 1 addition & 0 deletions android/java/res/values/brave_colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<color name="news_settings_following_count_bg_color">#1A000000</color>
<color name="news_settings_optin_color">#CCCCCC</color>
<color name="news_settings_switch_color">#4C54D2</color>
<color name="news_settings_unfollow_color">#4C54D2</color>

<!-- Incognito mode colors -->
<color name="ntp_bg_incognito">@color/incognito_modern_primary_color</color>
Expand Down

0 comments on commit 09b18ce

Please sign in to comment.