Update colors for dark mode support

This commit is contained in:
Jocelyn Liu
2019-11-20 19:17:41 -08:00
parent 8cc234692d
commit 28fae91955
16 changed files with 99 additions and 35 deletions
@@ -89,7 +89,6 @@ class BraveShieldsMenuAdapter extends BaseAdapter {
private static final float ENTER_STANDARD_ITEM_OFFSET_X_DP = 10.f;
private static final String BRAVE_SHIELDS_GREY = "#F2F2F2";
private static final String BRAVE_SHIELDS_BLACK = "#000000";
private static final String BRAVE_SHIELDS_WHITE = "#FFFFFF";
private static final String BRAVE_GROUP_TITLE_COLOR = "#6B6B6B";
private static final String ADS_AND_TRACKERS_COLOR = "#FB542B";
@@ -210,7 +209,6 @@ class BraveShieldsMenuAdapter extends BaseAdapter {
if (0 == position) {
convertView = mInflater.inflate(R.layout.brave_shields_switcher, parent, false);
setupSwitchClick((Switch)convertView.findViewById(R.id.brave_shields_switch));
convertView.setBackgroundColor(Color.parseColor(BRAVE_SHIELDS_GREY));
// We should set layouts for switch rows
} else if (1 == position || 2 == position || 8 == position || 14 == position) {
convertView = mInflater.inflate(R.layout.brave_shields_text_item, parent, false);
@@ -221,7 +219,8 @@ class BraveShieldsMenuAdapter extends BaseAdapter {
} else if (8 == position) {
text.setText(R.string.brave_shields_second_group_title);
} else if (1 == position) {
text.setTextColor(Color.parseColor(BRAVE_SHIELDS_BLACK));
text.setTextColor(convertView.getContext().getResources().getColor(
R.color.standard_mode_tint));
text.setTextSize(20);
text.setText(mTitle);
} else {
@@ -523,10 +523,10 @@
android:layout_marginTop="2dp"
android:padding="5dp"
android:text="@string/brave_ui_not_verified_publisher_description"
android:textColor="@color/modern_grey_700"
android:fontFamily="sans-serif"
android:gravity="start"
android:textSize="12sp"
android:textColor="@color/modern_grey_700"
android:background="@drawable/brave_rewards_not_verified_rectangle"
android:visibility="gone"/>
@@ -614,6 +614,7 @@
android:layout_gravity="start|center"
android:layout_marginStart="10dp"
android:text="@string/brave_ui_token_grant_claimed"
android:textColor="@color/modern_grey_700"
android:fontFamily="sans-serif"
android:gravity="start"
android:textSize="14sp"
@@ -640,6 +641,7 @@
android:layout_gravity="end"
android:layout_marginStart="10dp"
android:text=""
android:textColor="@color/modern_grey_700"
android:fontFamily="sans-serif"
android:gravity="end"
android:textSize="12sp"
@@ -655,6 +657,7 @@
android:layout_marginTop="10dp"
android:layout_marginStart="10dp"
android:text="@string/brave_ui_earnings_ads"
android:textColor="@color/modern_grey_700"
android:fontFamily="sans-serif"
android:gravity="start"
android:textSize="14sp"
@@ -683,6 +686,7 @@
android:layout_marginTop="10dp"
android:layout_marginStart="10dp"
android:text=""
android:textColor="@color/modern_grey_700"
android:fontFamily="sans-serif"
android:gravity="end"
android:textSize="12sp"
@@ -697,6 +701,7 @@
android:layout_marginTop="10dp"
android:layout_marginStart="10dp"
android:text="@string/brave_ui_rewards_contribute"
android:textColor="@color/modern_grey_700"
android:fontFamily="sans-serif"
android:gravity="start"
android:textSize="14sp"
@@ -725,6 +730,7 @@
android:layout_marginTop="10dp"
android:layout_marginStart="10dp"
android:text=""
android:textColor="@color/modern_grey_700"
android:fontFamily="sans-serif"
android:gravity="end"
android:textSize="12sp"
@@ -740,6 +746,7 @@
android:layout_marginTop="10dp"
android:layout_marginStart="10dp"
android:text="@string/brave_ui_one_time_donation"
android:textColor="@color/modern_grey_700"
android:fontFamily="sans-serif"
android:gravity="start"
android:textSize="14sp"
@@ -768,6 +775,7 @@
android:layout_marginTop="10dp"
android:layout_marginStart="10dp"
android:text=""
android:textColor="@color/modern_grey_700"
android:fontFamily="sans-serif"
android:gravity="end"
android:textSize="12sp"
@@ -783,6 +791,7 @@
android:layout_marginTop="10dp"
android:layout_marginStart="10dp"
android:text="@string/brave_ui_recurring_donation"
android:textColor="@color/modern_grey_700"
android:fontFamily="sans-serif"
android:gravity="start"
android:textSize="14sp"
@@ -811,6 +820,7 @@
android:layout_marginTop="10dp"
android:layout_marginStart="10dp"
android:text=""
android:textColor="@color/modern_grey_700"
android:fontFamily="sans-serif"
android:gravity="end"
android:textSize="12sp"
@@ -826,6 +836,7 @@
android:layout_marginStart="10dp"
android:padding="5dp"
android:text=""
android:textColor="@color/modern_grey_700"
android:fontFamily="sans-serif"
android:gravity="start"
android:textSize="12sp"
@@ -45,6 +45,7 @@
android:text=""
android:gravity="center"
android:layout_gravity="center_horizontal"
android:textColor="@color/modern_grey_700"
android:layout_marginStart="2dp"
android:layout_marginEnd="5dp"/>
@@ -83,4 +84,4 @@
android:visibility="gone"/>
</FrameLayout>
</LinearLayout>
</LinearLayout>
@@ -7,16 +7,18 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="8dp"
android:background="#FFF">
android:background="@drawable/brave_sync_top_rounded">
<ImageView
android:src="@drawable/btn_brave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="8dp"
tools:ignore="ContentDescription"/>
<TextView
android:text="@string/brave_set_default_browser_dialog_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#222"/>
android:layout_gravity="center_vertical"
android:textColor="@color/brave_set_default_dialog_text_color"/>
</LinearLayout>
@@ -19,6 +19,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/brave_shields_block_3rd_party_cookies_switch"
android:textColor="@color/standard_mode_tint"
android:orientation="horizontal"
android:paddingStart="10dp"
android:gravity="start|center_vertical"
@@ -19,6 +19,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/brave_shields_ads_tracking_switch"
android:textColor="@color/standard_mode_tint"
android:orientation="horizontal"
android:paddingStart="10dp"
android:gravity="start|center_vertical"
@@ -19,6 +19,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/brave_shields_block_fingerprints_switch"
android:textColor="@color/standard_mode_tint"
android:orientation="horizontal"
android:paddingStart="10dp"
android:gravity="start|center_vertical"
@@ -19,6 +19,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/brave_shields_https_everywhere_switch"
android:textColor="@color/standard_mode_tint"
android:orientation="horizontal"
android:paddingStart="10dp"
android:gravity="start|center_vertical"
@@ -22,7 +22,7 @@
android:textSize="16sp"
android:fontFamily="sans-serif"
android:textStyle="normal"
android:textColor="#696969"
android:textColor="@color/standard_mode_tint"
android:gravity="start|center_vertical"
android:layout_gravity="center_vertical"
android:paddingStart="10dp" />
@@ -19,6 +19,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/brave_shields_blocks_scripts_switch"
android:textColor="@color/standard_mode_tint"
android:orientation="horizontal"
android:paddingStart="10dp"
android:gravity="start|center_vertical"
@@ -1,27 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeightSmall"
android:paddingStart="15dp"
android:paddingEnd="15dp" >
<TextView
android:id="@+id/brave_shields"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:text="@string/brave_shields"
android:orientation="horizontal"
android:fontFamily="sans-serif-medium"
android:textColor="#000000"
android:textSize="18sp" />
<Switch
android:id="@+id/brave_shields_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:layout_weight="1"
android:orientation="horizontal"
android:switchMinWidth="56dp"
android:theme="@style/BraveSwitchTheme" />
</LinearLayout>
android:orientation="horizontal"
android:background="@color/brave_shield_bg_color" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeightSmall"
android:paddingStart="15dp"
android:paddingEnd="15dp" >
<TextView
android:id="@+id/brave_shields"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:text="@string/brave_shields"
android:orientation="horizontal"
android:fontFamily="sans-serif-medium"
android:textColor="@color/standard_mode_tint"
android:textSize="18sp" />
<Switch
android:id="@+id/brave_shields_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:layout_weight="1"
android:orientation="horizontal"
android:switchMinWidth="56dp"
android:theme="@style/BraveSwitchTheme" />
</LinearLayout>
</RelativeLayout>
@@ -13,5 +13,5 @@
android:textSize="14sp"
android:fontFamily="sans-serif"
android:textStyle="normal"
android:textColor="#6b6b6b" />
android:textColor="@color/standard_mode_tint" />
</RelativeLayout>
@@ -80,7 +80,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="#222326"
android:textColor="@color/brave_state_time_count_color"
android:textStyle="bold"
android:textSize="24sp" />
<TextView
+6
View File
@@ -23,11 +23,17 @@
<color name="onboarding_progress_mid_color">#FF1893</color>
<color name="onboarding_progress_end_color">#4F30AB</color>
<color name="brave_shield_bg_color">@color/default_primary_color</color>
<color name="brave_state_time_count_color">#222326</color>
<!-- Sync colors -->
<color name="brave_sync_bg_color">@color/modern_grey_50</color>
<color name="brave_sync_border_color">@color/modern_grey_50</color>
<color name="brave_sync_bg_secondary_color">@android:color/white</color>
<color name="brave_set_default_dialog_text_color">@color/modern_grey_700</color>
<!-- Theme colors -->
<color name="brave_theme_color">#fb542b</color>
<color name="brave_rewards_theme_color">#392DD1</color>
</resources>
+3 -1
View File
@@ -14,7 +14,9 @@
<item name="windowNoTitle">true</item>
</style>
<style name="BraveRewardsSwitchTheme">
<item name="colorControlActivated">#392DD1</item>
<item name="colorControlActivated">@color/brave_rewards_theme_color</item>
<item name="colorSwitchThumbNormal">@color/modern_grey_600</item>
<item name="android:colorForeground">@color/modern_grey_600</item>
</style>
<!-- Buttons for Brave Sync -->
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2019 The Brave Authors. All rights reserved.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this file,
You can obtain one at http://mozilla.org/MPL/2.0/
-->
<resources>
<color name="onboarding_text_color">@android:color/white</color>
<color name="onboarding_bg_color">#343A40</color>
<color name="onboarding_timer_color">#478AFF</color>
<color name="onboarding_progress_start_color">#FA7250</color>
<color name="onboarding_progress_mid_color">#FF1893</color>
<color name="onboarding_progress_end_color">#A78AFF</color>
<color name="onboarding_radio_button_active">#495057</color>
<color name="onboarding_progressbar_secondary_bg">#212529</color>
<color name="brave_shield_bg_color">@color/modern_grey_800</color>
<color name="brave_state_time_count_color">@android:color/white</color>
<!-- Sync colors -->
<color name="brave_sync_bg_color">@color/modern_grey_800</color>
<color name="brave_sync_border_color">@color/modern_grey_800</color>
<color name="brave_sync_bg_secondary_color">#212529</color>
<color name="brave_set_default_dialog_text_color">@android:color/white</color>
</resources>