commit 481dbed0e72b02d24d59ea627ede527adb21b6a0 parent 6fa68a53285b7f553114cda4030f51ffab3d1efb Author: Ryan VanderMeulen <rvandermeulen@mozilla.com> Date: Mon, 24 Nov 2025 11:51:41 -0500 Revert "Bug 1993368 - Part 14: Migrate layer1 usage to surface color token in XML r=android-reviewers,007" for causing bug 2001894. This reverts commit b7751b7668f93a3f66fe84632779182f48e3308a. Diffstat:
45 files changed, 92 insertions(+), 81 deletions(-)
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt @@ -245,7 +245,6 @@ import org.mozilla.fenix.utils.allowUndo import org.mozilla.fenix.wifi.SitePermissionsWifiIntegration import java.lang.ref.WeakReference import kotlin.coroutines.cancellation.CancellationException -import com.google.android.material.R as materialR import mozilla.components.feature.downloads.R as downloadsR import mozilla.components.ui.widgets.R as widgetsR @@ -934,7 +933,7 @@ abstract class BaseBrowserFragment : PasswordGeneratorDialogColors( title = ThemeManager.resolveAttributeColor(attribute = R.attr.textPrimary), description = ThemeManager.resolveAttributeColor(attribute = R.attr.textSecondary), - background = ThemeManager.resolveAttributeColor(attribute = materialR.attr.colorSurface), + background = ThemeManager.resolveAttributeColor(attribute = R.attr.layer1), cancelText = ThemeManager.resolveAttributeColor(attribute = R.attr.textAccent), confirmButton = ThemeManager.resolveAttributeColor(attribute = R.attr.actionPrimary), passwordBox = ThemeManager.resolveAttributeColor(attribute = R.attr.layer2), diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt @@ -167,7 +167,7 @@ class Core( enterpriseRootsEnabled = context.settings().allowThirdPartyRootCerts, clearColor = ContextCompat.getColor( context, - R.color.fx_mobile_surface, + R.color.fx_mobile_layer_color_1, ), httpsOnlyMode = context.settings().getHttpsOnlyMode(), dohSettingsMode = context.settings().getDohSettingsMode(), diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/customtabs/FennecWebAppIntentProcessor.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/customtabs/FennecWebAppIntentProcessor.kt @@ -143,7 +143,7 @@ class FennecWebAppIntentProcessor( return CustomTabConfig( colorSchemes = ColorSchemes( defaultColorSchemeParams = ColorSchemeParams( - toolbarColor = ContextCompat.getColor(context, R.color.fx_mobile_surface), + toolbarColor = ContextCompat.getColor(context, R.color.fx_mobile_layer_color_1), ), ), ) diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/LibraryPageFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/LibraryPageFragment.kt @@ -13,7 +13,6 @@ import org.mozilla.fenix.R import org.mozilla.fenix.browser.browsingmode.BrowsingMode import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.setToolbarColors -import com.google.android.material.R as materialR abstract class LibraryPageFragment<T> : Fragment() { @@ -42,8 +41,8 @@ abstract class LibraryPageFragment<T> : Fragment() { context?.let { activity?.title = getString(R.string.app_name) activity?.findViewById<Toolbar>(R.id.navigationToolbar)?.setToolbarColors( - it.getColorFromAttr(materialR.attr.colorOnSurface), - it.getColorFromAttr(materialR.attr.colorSurface), + it.getColorFromAttr(R.attr.textPrimary), + it.getColorFromAttr(R.attr.layer1), ) } } diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/LibraryPageView.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/LibraryPageView.kt @@ -12,7 +12,6 @@ import mozilla.components.support.ktx.android.content.getColorFromAttr import org.mozilla.fenix.R import org.mozilla.fenix.ext.asActivity import org.mozilla.fenix.ext.setToolbarColors -import com.google.android.material.R as materialR open class LibraryPageView( val containerView: ViewGroup, @@ -25,8 +24,8 @@ open class LibraryPageView( ) { updateToolbar( title = title, - foregroundColor = context.getColorFromAttr(materialR.attr.colorOnSurface), - backgroundColor = context.getColorFromAttr(materialR.attr.colorSurface), + foregroundColor = context.getColorFromAttr(R.attr.textPrimary), + backgroundColor = context.getColorFromAttr(R.attr.layer1), ) } diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/search/toolbar/ToolbarView.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/search/toolbar/ToolbarView.kt @@ -23,7 +23,6 @@ import org.mozilla.fenix.search.SearchFragmentState import org.mozilla.fenix.telemetry.ACTION_CLEAR_CLICKED import org.mozilla.fenix.telemetry.SOURCE_ADDRESS_BAR import org.mozilla.fenix.utils.Settings -import com.google.android.material.R as materialR import org.mozilla.fenix.GleanMetrics.Toolbar as GleanMetricsToolbar /** @@ -90,7 +89,7 @@ class ToolbarView( background = AppCompatResources.getDrawable( context, - context.theme.resolveAttribute(materialR.attr.colorSurface), + context.theme.resolveAttribute(R.attr.layer1), ) edit.hint = context.getString(R.string.search_hint) diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt @@ -13,12 +13,12 @@ import mozilla.components.support.ktx.android.content.appVersionName import mozilla.components.support.ktx.android.content.getColorFromAttr import org.mozilla.fenix.BuildConfig import org.mozilla.fenix.IntentReceiverActivity +import org.mozilla.fenix.R import org.mozilla.fenix.customtabs.EXTRA_IS_SANDBOX_CUSTOM_TAB import org.mozilla.fenix.settings.account.AuthIntentReceiverActivity import java.io.UnsupportedEncodingException import java.net.URLEncoder import java.util.Locale -import com.google.android.material.R as materialR object SupportUtils { const val RATE_APP_URL = "market://details?id=" + BuildConfig.APPLICATION_ID @@ -123,8 +123,7 @@ object SupportUtils { fun createCustomTabIntent(context: Context, url: String): Intent = CustomTabsIntent.Builder() .setInstantAppsEnabled(false) .setDefaultColorSchemeParams( - CustomTabColorSchemeParams.Builder() - .setToolbarColor(context.getColorFromAttr(materialR.attr.colorSurface)).build(), + CustomTabColorSchemeParams.Builder().setToolbarColor(context.getColorFromAttr(R.attr.layer1)).build(), ) .build() .intent diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tabhistory/TabHistoryDialogFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tabhistory/TabHistoryDialogFragment.kt @@ -48,7 +48,7 @@ class TabHistoryDialogFragment : BottomSheetDialogFragment() { val binding = FragmentTabHistoryDialogBinding.bind(view) - view.setBackgroundColor(view.context.getColorFromAttr(materialR.attr.colorSurface)) + view.setBackgroundColor(view.context.getColorFromAttr(R.attr.layer1)) customTabSessionId = requireArguments().getString(EXTRA_SESSION_ID) diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/theme/ThemeManager.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/theme/ThemeManager.kt @@ -24,7 +24,6 @@ import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.R import org.mozilla.fenix.browser.browsingmode.BrowsingMode import org.mozilla.fenix.customtabs.ExternalAppBrowserActivity -import com.google.android.material.R as materialR abstract class ThemeManager { @@ -121,7 +120,7 @@ abstract class ThemeManager { } private fun updateNavigationBar(window: Window, context: Context) { - window.setNavigationBarColorCompat(context.getColorFromAttr(materialR.attr.colorSurface)) + window.setNavigationBarColorCompat(context.getColorFromAttr(R.attr.layer1)) } private fun setStatusBarColor( diff --git a/mobile/android/fenix/app/src/main/res/drawable/bottom_sheet_with_top_rounded_corners.xml b/mobile/android/fenix/app/src/main/res/drawable/bottom_sheet_with_top_rounded_corners.xml @@ -8,5 +8,5 @@ <corners android:topLeftRadius="@dimen/bottom_sheet_corner_radius_28dp" android:topRightRadius="@dimen/bottom_sheet_corner_radius_28dp" /> - <solid android:color="?attr/colorSurface" /> + <solid android:color="?attr/layer1" /> </shape> diff --git a/mobile/android/fenix/app/src/main/res/drawable/home_bottom_bar_background.xml b/mobile/android/fenix/app/src/main/res/drawable/home_bottom_bar_background.xml @@ -6,7 +6,7 @@ <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape> - <solid android:color="?attr/colorSurface" /> + <solid android:color="@color/fx_mobile_layer_color_1" /> </shape> </item> <item android:bottom="-2dp" android:left="-2dp" android:right="-2dp"> diff --git a/mobile/android/fenix/app/src/main/res/drawable/home_bottom_bar_background_no_divider.xml b/mobile/android/fenix/app/src/main/res/drawable/home_bottom_bar_background_no_divider.xml @@ -5,7 +5,7 @@ <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape> - <solid android:color="?attr/colorSurface" /> + <solid android:color="@color/fx_mobile_layer_color_1" /> </shape> </item> </layer-list> diff --git a/mobile/android/fenix/app/src/main/res/drawable/home_bottom_bar_background_top.xml b/mobile/android/fenix/app/src/main/res/drawable/home_bottom_bar_background_top.xml @@ -6,7 +6,7 @@ <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape> - <solid android:color="?attr/colorSurface" /> + <solid android:color="@color/fx_mobile_layer_color_1" /> </shape> </item> <item android:top="-2dp" android:left="-2dp" android:right="-2dp"> diff --git a/mobile/android/fenix/app/src/main/res/drawable/ic_search_results_bookmarks.xml b/mobile/android/fenix/app/src/main/res/drawable/ic_search_results_bookmarks.xml @@ -7,7 +7,7 @@ android:width="16dp" android:viewportHeight="20" android:viewportWidth="20"> - <path android:fillColor="?attr/colorSurface" + <path android:fillColor="?attr/layer1" android:pathData="M9.697 0.007c-1.094 0.072-2.075 0.72-2.568 1.71l-1.48 2.965-3.09 0.552C1.446 5.43 0.522 6.223 0.161 7.301L0.1 7.505c-0.268 1.022 0.005 2.117 0.732 2.897l2.276 2.447-0.476 3.419c-0.161 1.15 0.335 2.294 1.285 2.963l0.181 0.119c0.924 0.558 2.078 0.599 3.043 0.093l2.759-1.44 2.766 1.444c1.027 0.538 2.271 0.457 3.222-0.213l0.162-0.123c0.844-0.68 1.274-1.758 1.122-2.841l-0.478-3.421 2.278-2.449c0.774-0.828 1.032-2.018 0.671-3.097l-0.069-0.186c-0.397-0.975-1.267-1.687-2.312-1.879l-3.108-0.556-1.477-2.965C12.153 0.665 11.078 0 9.903 0z"/> <path android:fillColor="?attr/awesomeBarIndicatorBookmarkColor" android:pathData="M9.903 2c0.371 0 0.713 0.186 0.916 0.49l0.069 0.12 1.926 3.864 4.089 0.731c0.394 0.073 0.718 0.353 0.845 0.733 0.114 0.34 0.054 0.712-0.154 0.998l-0.085 0.102-2.926 3.146 0.61 4.363c0.057 0.409-0.119 0.815-0.456 1.052-0.3 0.211-0.682 0.258-1.02 0.131l-0.124-0.056-3.69-1.927-3.69 1.924c-0.365 0.192-0.806 0.163-1.143-0.075-0.3-0.21-0.472-0.555-0.467-0.916l0.01-0.136 0.61-4.36-2.927-3.147C2.02 8.742 1.929 8.32 2.057 7.937c0.114-0.34 0.386-0.6 0.724-0.703l0.13-0.03 4.08-0.73L8.92 2.61C9.105 2.236 9.486 2 9.903 2z"/> diff --git a/mobile/android/fenix/app/src/main/res/drawable/ic_search_results_device_desktop.xml b/mobile/android/fenix/app/src/main/res/drawable/ic_search_results_device_desktop.xml @@ -7,7 +7,7 @@ android:width="16dp" android:viewportHeight="20" android:viewportWidth="20"> - <path android:fillColor="?attr/colorSurface" + <path android:fillColor="?attr/layer1" android:pathData="M16 2c1.598 0 2.904 1.249 2.995 2.824L19 5v7.501l0.098 0.076c0.465 0.387 0.788 0.94 0.877 1.568l0.02 0.19L20 14.5v1c0 1.326-1.032 2.41-2.336 2.495L17.5 18h-15c-1.325 0-2.41-1.032-2.495-2.336L0 15.5v-1c0-0.709 0.295-1.349 0.769-1.804l0.133-0.119L1 12.5V5c0-1.538 1.158-2.807 2.65-2.98l0.174-0.015L4 2z"/> <path android:fillColor="?attr/awesomeBarIndicatorColor" android:pathData="M16 4l0.117 0.007c0.42 0.049 0.762 0.359 0.857 0.764l0.02 0.112L17 5v9h0.5l0.09 0.008c0.175 0.032 0.318 0.155 0.379 0.318l0.023 0.084L18 14.5v1l-0.008 0.09c-0.032 0.175-0.155 0.318-0.318 0.379l-0.084 0.023L17.5 16h-15l-0.09-0.008c-0.175-0.032-0.318-0.155-0.379-0.318L2.008 15.59 2 15.5v-1l0.008-0.09c0.032-0.175 0.154-0.318 0.318-0.379l0.084-0.023L2.5 14H3V5l0.007-0.117c0.049-0.42 0.359-0.762 0.764-0.857l0.112-0.02L4 4zm-4 10H8v1h4zm3-8H5v7h10z"/> diff --git a/mobile/android/fenix/app/src/main/res/drawable/ic_search_results_device_mobile.xml b/mobile/android/fenix/app/src/main/res/drawable/ic_search_results_device_mobile.xml @@ -7,7 +7,7 @@ android:width="16dp" android:viewportHeight="20" android:viewportWidth="20"> - <path android:fillColor="?attr/colorSurface" + <path android:fillColor="?attr/layer1" android:pathData="M6 0h8a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"/> <path android:fillColor="?attr/awesomeBarIndicatorColor" android:pathData="M14 2H6C4.895 2 4 2.895 4 4v12c0 1.105 0.895 2 2 2h8c1.105 0 2-0.895 2-2V4c0-1.105-0.895-2-2-2zm-3 15H9v-1h2zm3-2.5c0 0.276-0.224 0.5-0.5 0.5h-7C6.224 15 6 14.776 6 14.5v-10C6 4.224 6.224 4 6.5 4h7C13.776 4 14 4.224 14 4.5z"/> diff --git a/mobile/android/fenix/app/src/main/res/drawable/ic_search_results_device_tablet.xml b/mobile/android/fenix/app/src/main/res/drawable/ic_search_results_device_tablet.xml @@ -7,7 +7,7 @@ android:width="16dp" android:viewportHeight="20" android:viewportWidth="20"> - <path android:fillColor="?attr/colorSurface" + <path android:fillColor="?attr/layer1" android:pathData="M4 1h12c2.21 0 4 1.79 4 4v10c0 2.21-1.79 4-4 4H4c-2.21 0-4-1.79-4-4V5c0-2.21 1.79-4 4-4z"/> <path android:fillColor="?attr/awesomeBarIndicatorColor" android:pathData="M16 3H4C2.895 3 2 3.895 2 5v10c0 1.105 0.895 2 2 2h12c1.105 0 2-0.895 2-2V5c0-1.105-0.895-2-2-2zm-1 11.5c0 0.276-0.224 0.5-0.5 0.5h-10C4.224 15 4 14.776 4 14.5v-9C4 5.224 4.224 5 4.5 5h10C14.776 5 15 5.224 15 5.5zm2-3.5h-1V9h1z"/> diff --git a/mobile/android/fenix/app/src/main/res/drawable/ic_search_results_tab.xml b/mobile/android/fenix/app/src/main/res/drawable/ic_search_results_tab.xml @@ -7,7 +7,7 @@ android:width="16dp" android:viewportHeight="20" android:viewportWidth="20"> - <path android:fillColor="?attr/colorSurface" + <path android:fillColor="?attr/layer1" android:pathData="M6 3L5.8 3.005C3.684 3.109 2 4.858 2 7v4.17l-0.012 0.005C0.83 11.59 0 12.698 0 14c0 1.657 1.343 3 3 3h14c1.657 0 3-1.343 3-3l-0.005-0.176c-0.067-1.157-0.79-2.138-1.802-2.577L18 11.17V7c0-2.21-1.79-4-4-4z"/> <path android:fillColor="?attr/awesomeBarIndicatorColor" android:pathData="M14 5c1.054 0 1.918 0.816 1.994 1.85L16 7v6h1c0.552 0 1 0.448 1 1 0 0.513-0.386 0.935-0.883 0.993L17 15H3c-0.552 0-1-0.448-1-1 0-0.513 0.386-0.935 0.883-0.993L3 13h1V7c0-1.054 0.816-1.918 1.85-1.994L6 5z"/> diff --git a/mobile/android/fenix/app/src/main/res/drawable/recent_apps_background.xml b/mobile/android/fenix/app/src/main/res/drawable/recent_apps_background.xml @@ -3,6 +3,6 @@ - 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/. --> <shape xmlns:android="http://schemas.android.com/apk/res/android"> - <solid android:color="?attr/colorSurface"/> + <solid android:color="@color/fx_mobile_layer_color_1"/> <corners android:radius="@dimen/share_recent_apps_background_radius"/> </shape> diff --git a/mobile/android/fenix/app/src/main/res/drawable/rounded_search_widget_background.xml b/mobile/android/fenix/app/src/main/res/drawable/rounded_search_widget_background.xml @@ -4,6 +4,6 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <shape xmlns:android="http://schemas.android.com/apk/res/android"> - <solid android:color="?attr/colorSurface" /> + <solid android:color="@color/fx_mobile_layer_color_1" /> <corners android:radius="@dimen/tab_corner_radius"/> </shape> diff --git a/mobile/android/fenix/app/src/main/res/drawable/toolbar_background_no_divider.xml b/mobile/android/fenix/app/src/main/res/drawable/toolbar_background_no_divider.xml @@ -4,5 +4,5 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <solid android:color="?attr/colorSurface" /> + <solid android:color="@color/fx_mobile_layer_color_1" /> </shape> diff --git a/mobile/android/fenix/app/src/main/res/layout/address_select_bar.xml b/mobile/android/fenix/app/src/main/res/layout/address_select_bar.xml @@ -1,13 +1,15 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- 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/. --> +<?xml version="1.0" encoding="utf-8"?><!-- + ~ 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 https://mozilla.org/MPL/2.0/. + --> + <mozilla.components.feature.prompts.address.AddressSelectBar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/addressSelectBar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:elevation="@dimen/browser_fragment_above_toolbar_panels_elevation" android:outlineProvider="none" android:visibility="gone" diff --git a/mobile/android/fenix/app/src/main/res/layout/component_collection_creation.xml b/mobile/android/fenix/app/src/main/res/layout/component_collection_creation.xml @@ -117,7 +117,7 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|center" android:autofillHints="false" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:focusedByDefault="true" android:hint="@string/collection_name_hint" android:imeOptions="actionDone" diff --git a/mobile/android/fenix/app/src/main/res/layout/component_collection_creation_name_collection.xml b/mobile/android/fenix/app/src/main/res/layout/component_collection_creation_name_collection.xml @@ -61,7 +61,7 @@ android:layout_gravity="bottom|center" android:alpha="1" android:autofillHints="false" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:focusedByDefault="true" android:hint="@string/collection_name_hint" android:imeOptions="actionDone" diff --git a/mobile/android/fenix/app/src/main/res/layout/component_collection_creation_select_collection.xml b/mobile/android/fenix/app/src/main/res/layout/component_collection_creation_select_collection.xml @@ -65,7 +65,7 @@ android:layout_gravity="bottom|center" android:alpha="0" android:autofillHints="false" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:focusedByDefault="true" android:hint="@string/collection_name_hint" android:imeOptions="actionDone" diff --git a/mobile/android/fenix/app/src/main/res/layout/component_cookie_banner_details_panel.xml b/mobile/android/fenix/app/src/main/res/layout/component_cookie_banner_details_panel.xml @@ -8,7 +8,7 @@ android:id="@+id/panel_wrapper" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/colorSurface"> + android:background="?attr/layer1"> <ImageView android:id="@+id/navigate_back" diff --git a/mobile/android/fenix/app/src/main/res/layout/component_find_in_page_bar.xml b/mobile/android/fenix/app/src/main/res/layout/component_find_in_page_bar.xml @@ -8,7 +8,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="56dp" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:clickable="true" android:elevation="@dimen/browser_fragment_toolbar_elevation" android:focusable="true" diff --git a/mobile/android/fenix/app/src/main/res/layout/component_tracking_protection_panel.xml b/mobile/android/fenix/app/src/main/res/layout/component_tracking_protection_panel.xml @@ -10,7 +10,7 @@ android:id="@+id/panel_wrapper" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/colorSurface"> + android:background="?attr/layer1"> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/normal_mode" diff --git a/mobile/android/fenix/app/src/main/res/layout/connection_details_website_info.xml b/mobile/android/fenix/app/src/main/res/layout/connection_details_website_info.xml @@ -10,7 +10,7 @@ android:id="@+id/website_info_view" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:orientation="horizontal"> <ImageView diff --git a/mobile/android/fenix/app/src/main/res/layout/creditcard_select_bar.xml b/mobile/android/fenix/app/src/main/res/layout/creditcard_select_bar.xml @@ -1,13 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- 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/. --> <mozilla.components.feature.prompts.creditcard.CreditCardSelectBar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/creditCardSelectBar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:elevation="@dimen/browser_fragment_above_toolbar_panels_elevation" android:outlineProvider="none" android:visibility="gone" diff --git a/mobile/android/fenix/app/src/main/res/layout/fragment_browser.xml b/mobile/android/fenix/app/src/main/res/layout/fragment_browser.xml @@ -49,7 +49,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:elevation="24dp" android:visibility="gone" /> diff --git a/mobile/android/fenix/app/src/main/res/layout/fragment_quick_settings_dialog_sheet.xml b/mobile/android/fenix/app/src/main/res/layout/fragment_quick_settings_dialog_sheet.xml @@ -14,7 +14,7 @@ android:id="@+id/quick_action_sheet" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/colorSurface"> + android:background="?attr/layer1"> <FrameLayout android:id="@+id/websiteInfoLayout" diff --git a/mobile/android/fenix/app/src/main/res/layout/fragment_search_dialog.xml b/mobile/android/fenix/app/src/main/res/layout/fragment_search_dialog.xml @@ -61,7 +61,7 @@ android:fadingEdgeLength="40dp" android:nestedScrollingEnabled="false" android:requiresFadingEdge="vertical" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:visibility="invisible" app:layout_constraintBottom_toTopOf="@+id/keyboard_divider" app:layout_constraintEnd_toEndOf="parent" @@ -72,7 +72,7 @@ android:id="@+id/fill_link_from_clipboard" android:layout_width="0dp" android:layout_height="@dimen/search_fragment_clipboard_item_height" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:clickable="true" android:focusable="true" android:visibility="gone" diff --git a/mobile/android/fenix/app/src/main/res/layout/fragment_sign_out.xml b/mobile/android/fenix/app/src/main/res/layout/fragment_sign_out.xml @@ -7,7 +7,7 @@ android:id="@+id/sign_out_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:padding="8dp"> <TextView diff --git a/mobile/android/fenix/app/src/main/res/layout/info_banner.xml b/mobile/android/fenix/app/src/main/res/layout/info_banner.xml @@ -8,7 +8,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="21dp" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:paddingStart="11dp" android:paddingTop="21dp" android:paddingEnd="16dp"> diff --git a/mobile/android/fenix/app/src/main/res/layout/login_select_bar.xml b/mobile/android/fenix/app/src/main/res/layout/login_select_bar.xml @@ -6,7 +6,7 @@ android:id="@+id/loginSelectBar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:elevation="@dimen/browser_fragment_above_toolbar_panels_elevation" android:outlineProvider="none" android:visibility="gone" /> diff --git a/mobile/android/fenix/app/src/main/res/layout/navigation_toolbar.xml b/mobile/android/fenix/app/src/main/res/layout/navigation_toolbar.xml @@ -11,7 +11,7 @@ app:titleMarginStart="16dp" app:titleMarginEnd="16dp" app:titleTextAppearance="@style/ToolbarTitleTextStyle" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:elevation="8dp"> <FrameLayout diff --git a/mobile/android/fenix/app/src/main/res/layout/search_suggestions_hint.xml b/mobile/android/fenix/app/src/main/res/layout/search_suggestions_hint.xml @@ -18,7 +18,7 @@ <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:paddingStart="20dp" android:paddingTop="20dp" android:paddingEnd="20dp" diff --git a/mobile/android/fenix/app/src/main/res/layout/suggest_strong_password_bar.xml b/mobile/android/fenix/app/src/main/res/layout/suggest_strong_password_bar.xml @@ -1,10 +1,12 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- 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/. --> +<?xml version="1.0" encoding="utf-8"?><!-- + ~ 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/. + --> + <mozilla.components.feature.prompts.login.SuggestStrongPasswordBar xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/suggestStrongPasswordBar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/colorSurface" + android:background="?attr/layer1" android:visibility="gone" /> diff --git a/mobile/android/fenix/app/src/main/res/values-night/colors.xml b/mobile/android/fenix/app/src/main/res/values-night/colors.xml @@ -52,6 +52,8 @@ <!-- Design system color variables --> <!-- Layers --> + <!-- Default Screen background, Frontlayer background, App Bar Top, App Bar Bottom, Frontlayer header --> + <color name="fx_mobile_layer_color_1">@color/photonDarkGrey60</color> <!-- Card background, Menu background, Dialog, Banner --> <color name="fx_mobile_layer_color_2">@color/photonDarkGrey30</color> <!-- Search --> diff --git a/mobile/android/fenix/app/src/main/res/values-night/styles.xml b/mobile/android/fenix/app/src/main/res/values-night/styles.xml @@ -12,13 +12,13 @@ <item name="android:windowLightStatusBar">false</item> <!-- Style the navigation bar --> - <item name="android:navigationBarColor">?attr/colorSurface</item> + <item name="android:navigationBarColor">?attr/layer1</item> </style> <style name="TabTrayDialogStyle" parent="TabTrayDialogStyleBase"> <item name="android:windowLightStatusBar">false</item> <!-- Style the navigation bar --> - <item name="android:navigationBarColor">@color/fx_mobile_surface</item> + <item name="android:navigationBarColor">@color/fx_mobile_layer_color_1</item> </style> </resources> diff --git a/mobile/android/fenix/app/src/main/res/values-v27/styles.xml b/mobile/android/fenix/app/src/main/res/values-v27/styles.xml @@ -37,8 +37,8 @@ <style name="BottomSheetPrivate" parent="BottomSheetBasePrivate"> <item name="android:windowIsFloating">false</item> <item name="android:statusBarColor">@android:color/transparent</item> - <item name="android:navigationBarColor">?attr/colorSurface</item> - <item name="android:colorBackground">?attr/colorSurface</item> + <item name="android:navigationBarColor">?attr/layer1</item> + <item name="android:colorBackground">?attr/layer1</item> <!-- Style the navigation bar --> <item name="android:navigationBarDividerColor">@android:color/transparent</item> <item name="android:windowLightNavigationBar">false</item> @@ -47,8 +47,8 @@ <style name="BottomSheet" parent="BottomSheetBase"> <item name="android:windowIsFloating">false</item> <item name="android:statusBarColor">@android:color/transparent</item> - <item name="android:navigationBarColor">?attr/colorSurface</item> - <item name="android:colorBackground">?attr/colorSurface</item> + <item name="android:navigationBarColor">?attr/layer1</item> + <item name="android:colorBackground">?attr/layer1</item> <!-- Style the navigation bar --> <item name="android:windowLightNavigationBar">@bool/theme_is_light</item> <item name="android:navigationBarDividerColor">@android:color/transparent</item> @@ -57,6 +57,6 @@ <style name="TabTrayDialogStyle" parent="TabTrayDialogStyleBase"> <item name="android:navigationBarDividerColor">@android:color/transparent</item> <item name="android:windowLightNavigationBar">@bool/theme_is_light</item> - <item name="android:navigationBarColor">@color/fx_mobile_surface</item> + <item name="android:navigationBarColor">@color/fx_mobile_layer_color_1</item> </style> </resources> diff --git a/mobile/android/fenix/app/src/main/res/values/attrs.xml b/mobile/android/fenix/app/src/main/res/values/attrs.xml @@ -6,6 +6,8 @@ <!-- Design system color attributes --> <!-- Layers --> + <!-- Default Screen background, Frontlayer background, App Bar Top, App Bar Bottom, Frontlayer header --> + <attr name="layer1" format="reference" /> <!-- Card background, Menu background, Dialog, Banner --> <attr name="layer2" format="reference" /> <!-- Search --> diff --git a/mobile/android/fenix/app/src/main/res/values/colors.xml b/mobile/android/fenix/app/src/main/res/values/colors.xml @@ -52,6 +52,8 @@ <!-- Design system color variables --> <!-- Layers --> + <!-- Default Screen background, Frontlayer background, App Bar Top, App Bar Bottom, Frontlayer header --> + <color name="fx_mobile_layer_color_1">@color/photonLightGrey10</color> <!-- Card background, Menu background, Dialog, Banner --> <color name="fx_mobile_layer_color_2">@color/photonWhite</color> <!-- Search --> @@ -256,6 +258,12 @@ <!-- Search --> <color name="fx_mobile_private_layer_color_3">@color/photonInk90</color> <color name="fx_mobile_private_layer_color_search">@color/photonInk90</color> + <!-- Homescreen background, Toolbar --> + <color name="fx_mobile_private_layer_color_4_start">@color/photonPurple70</color> + <!-- Homescreen background, Toolbar --> + <color name="fx_mobile_private_layer_color_4_center">@color/photonViolet80</color> + <!-- Homescreen background, Toolbar --> + <color name="fx_mobile_private_layer_color_4_end">@color/photonInk05</color> <!-- App Bar Top (edit), Text Cursor, Selected Tab Check --> <color name="fx_mobile_private_layer_color_accent" tools:ignore="UnusedResources">@color/photonViolet40</color> <!-- Selected tab --> diff --git a/mobile/android/fenix/app/src/main/res/values/styles.xml b/mobile/android/fenix/app/src/main/res/values/styles.xml @@ -10,7 +10,7 @@ <style name="SplashScreenThemeBase" parent="Theme.SplashScreen"> <item name="windowSplashScreenAnimatedIcon">@drawable/splash_screen</item> - <item name="windowSplashScreenBackground">@color/fx_mobile_surface</item> + <item name="windowSplashScreenBackground">@color/fx_mobile_layer_color_1</item> <item name="postSplashScreenTheme">@style/NormalTheme</item> </style> @@ -25,9 +25,9 @@ <item name="android:windowAnimationStyle">@style/WindowAnimationTransition</item> <item name="android:progressBarStyleHorizontal">@style/progressBarStyleHorizontal</item> <item name="android:statusBarColor">@android:color/transparent</item> - <item name="android:navigationBarColor">?attr/colorSurface</item> + <item name="android:navigationBarColor">?attr/layer1</item> <item name="android:windowTranslucentNavigation">false</item> - <item name="android:windowBackground">@color/fx_mobile_surface</item> + <item name="android:windowBackground">@color/fx_mobile_layer_color_1</item> <item name="android:colorEdgeEffect">@color/accent_normal_theme</item> <item name="android:colorAccent">@color/fx_mobile_text_color_primary</item> <item name="android:textColorPrimary">@color/state_list_text_color</item> @@ -97,6 +97,8 @@ <!-- Design system color attributes --> <!-- Layers --> + <!-- Default Screen background, Frontlayer background, App Bar Top, App Bar Bottom, Frontlayer header --> + <item name="layer1">@color/fx_mobile_layer_color_1</item> <!-- Card background, Menu background, Dialog, Banner --> <item name="layer2">@color/fx_mobile_layer_color_2</item> <!-- Search --> @@ -162,9 +164,9 @@ <item name="neutral">@color/neutral_normal_theme</item> <item name="neutralFaded">@color/neutral_faded_normal_theme</item> <item name="accentUsedOnDarkBackground">@color/fx_mobile_text_color_accent</item> - <item name="toolbarStartGradient">@color/fx_mobile_surface</item> - <item name="toolbarCenterGradient">@color/fx_mobile_surface</item> - <item name="toolbarEndGradient">@color/fx_mobile_surface</item> + <item name="toolbarStartGradient">@color/fx_mobile_layer_color_1</item> + <item name="toolbarCenterGradient">@color/fx_mobile_layer_color_1</item> + <item name="toolbarEndGradient">@color/fx_mobile_layer_color_1</item> <item name="fillLinkFromClipboard">@color/fill_link_from_clipboard_normal_theme</item> <item name="syncDisconnected">@color/sync_disconnected_icon_fill_normal_theme</item> <item name="syncDisconnectedBackground">@color/sync_disconnected_background_normal_theme</item> @@ -394,6 +396,8 @@ <!-- Design system color attributes --> <!-- Layers --> + <!-- Default Screen background, Frontlayer background, App Bar Top, App Bar Bottom, Frontlayer header --> + <item name="layer1">@color/fx_mobile_private_layer_color_1</item> <!-- Card background, Menu background, Dialog, Banner --> <item name="layer2">@color/fx_mobile_private_layer_color_2</item> <!-- Search --> @@ -457,9 +461,9 @@ <item name="neutral">@color/neutral_private_theme</item> <item name="neutralFaded">@color/neutral_faded_private_theme</item> <item name="accentUsedOnDarkBackground">@color/accent_high_contrast_private_theme</item> - <item name="toolbarStartGradient">@color/fx_mobile_private_surface</item> - <item name="toolbarCenterGradient">@color/fx_mobile_private_surface</item> - <item name="toolbarEndGradient">@color/fx_mobile_private_surface</item> + <item name="toolbarStartGradient">@color/fx_mobile_private_layer_color_4_start</item> + <item name="toolbarCenterGradient">@color/fx_mobile_private_layer_color_4_center</item> + <item name="toolbarEndGradient">@color/fx_mobile_private_layer_color_4_end</item> <item name="fillLinkFromClipboard">@color/accent_high_contrast_private_theme</item> <item name="syncDisconnected">@color/sync_disconnected_icon_fill_private_theme</item> <item name="syncDisconnectedBackground">@color/sync_disconnected_background_private_theme</item> @@ -505,7 +509,7 @@ <item name="android:windowLightStatusBar">false</item> <!-- Style the navigation bar --> - <item name="android:navigationBarColor">?attr/colorSurface</item> + <item name="android:navigationBarColor">?attr/layer1</item> </style> <!-- Fade animation for theme switching --> @@ -801,7 +805,7 @@ <item name="android:windowLightStatusBar">false</item> <!-- Style the navigation bar --> - <item name="android:navigationBarColor">?attr/colorSurface</item> + <item name="android:navigationBarColor">?attr/layer1</item> </style> <style name="BottomSheet" parent="@style/BottomSheetBase" /> @@ -817,7 +821,7 @@ <!-- Tab Tray does not present a private theme, so it needs to be separate from other bottom sheet styles --> <style name="TabTrayDialogStyleBase" parent="BottomSheetBase"> <item name="bottomSheetStyle">@style/BottomSheetModal</item> - <item name="android:colorBackground">@color/fx_mobile_surface</item> + <item name="android:colorBackground">@color/fx_mobile_layer_color_1</item> </style> <style name="TabTrayDialogStyle" parent="TabTrayDialogStyleBase" /> @@ -853,9 +857,9 @@ <item name="windowActionBar">false</item> <item name="android:windowFullscreen">false</item> <item name="android:windowContentOverlay">@null</item> - <item name="android:navigationBarColor">?attr/colorSurface</item> + <item name="android:navigationBarColor">?attr/layer1</item> <item name="android:windowTranslucentNavigation">false</item> - <item name="android:statusBarColor">?attr/colorSurface</item> + <item name="android:statusBarColor">?attr/layer1</item> </style> <style name="SearchDialogStyleTabStrip" parent="SearchDialogStyle">