For #24252 - Rename foundation attribute to layer1

upstream-sync
Gabriel Luong 2 years ago committed by mergify[bot]
parent 331dc3a8ec
commit 9817be4fd0

@ -41,7 +41,7 @@ abstract class LibraryPageFragment<T> : Fragment() {
context?.let {
activity?.findViewById<Toolbar>(R.id.navigationToolbar)?.setToolbarColors(
it.getColorFromAttr(R.attr.textPrimary),
it.getColorFromAttr(R.attr.foundation)
it.getColorFromAttr(R.attr.layer1)
)
}
}

@ -25,7 +25,7 @@ open class LibraryPageView(
updateToolbar(
title = title,
foregroundColor = context.getColorFromAttr(R.attr.textPrimary),
backgroundColor = context.getColorFromAttr(R.attr.foundation)
backgroundColor = context.getColorFromAttr(R.attr.layer1)
)
}

@ -166,7 +166,7 @@ class EditBookmarkFragment : Fragment(R.layout.fragment_edit_bookmark) {
val toolbar = activity.findViewById<Toolbar>(R.id.navigationToolbar)
toolbar?.setToolbarColors(
foreground = activity.getColorFromAttr(R.attr.textPrimary),
background = activity.getColorFromAttr(R.attr.foundation)
background = activity.getColorFromAttr(R.attr.layer1)
)
actionBar.show()
}

@ -52,7 +52,7 @@ class ToolbarView(
editMode()
background = AppCompatResources.getDrawable(
context, context.theme.resolveAttribute(R.attr.foundation)
context, context.theme.resolveAttribute(R.attr.layer1)
)
edit.hint = context.getString(R.string.history_search_1)

@ -40,7 +40,7 @@ class MigrationProgressActivity : AbstractMigrationProgressActivity() {
}
fun init() {
window.navigationBarColor = getColorFromAttr(R.attr.foundation)
window.navigationBarColor = getColorFromAttr(R.attr.layer1)
val appName = binding.migrationDescription.context.getString(R.string.app_name)

@ -79,7 +79,7 @@ class ToolbarView(
}
background = AppCompatResources.getDrawable(
context, context.theme.resolveAttribute(R.attr.foundation)
context, context.theme.resolveAttribute(R.attr.layer1)
)
edit.hint = context.getString(R.string.search_hint)

@ -103,7 +103,7 @@ object SupportUtils {
fun createCustomTabIntent(context: Context, url: String): Intent = CustomTabsIntent.Builder()
.setInstantAppsEnabled(false)
.setDefaultColorSchemeParams(
CustomTabColorSchemeParams.Builder().setToolbarColor(context.getColorFromAttr(R.attr.foundation)).build()
CustomTabColorSchemeParams.Builder().setToolbarColor(context.getColorFromAttr(R.attr.layer1)).build()
)
.build()
.intent

@ -37,7 +37,7 @@ class TabHistoryDialogFragment : BottomSheetDialogFragment() {
val binding = FragmentTabHistoryDialogBinding.bind(view)
view.setBackgroundColor(view.context.getColorFromAttr(R.attr.foundation))
view.setBackgroundColor(view.context.getColorFromAttr(R.attr.layer1))
customTabSessionId = requireArguments().getString(EXTRA_SESSION_ID)

@ -109,7 +109,7 @@ abstract class ThemeManager {
}
private fun updateNavigationBar(window: Window, context: Context) {
window.navigationBarColor = context.getColorFromAttr(R.attr.foundation)
window.navigationBarColor = context.getColorFromAttr(R.attr.layer1)
}
}
}

@ -7,7 +7,7 @@
android:width="16dp"
android:viewportHeight="20"
android:viewportWidth="20">
<path android:fillColor="?attr/foundation"
<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"/>

@ -7,7 +7,7 @@
android:width="16dp"
android:viewportHeight="20"
android:viewportWidth="20">
<path android:fillColor="?attr/foundation"
<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"/>

@ -7,7 +7,7 @@
android:width="16dp"
android:viewportHeight="20"
android:viewportWidth="20">
<path android:fillColor="?attr/foundation"
<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"/>

@ -7,7 +7,7 @@
android:width="16dp"
android:viewportHeight="20"
android:viewportWidth="20">
<path android:fillColor="?attr/foundation"
<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"/>

@ -7,7 +7,7 @@
android:width="16dp"
android:viewportHeight="20"
android:viewportWidth="20">
<path android:fillColor="?attr/foundation"
<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"/>

@ -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="?foundation"/>
<solid android:color="?attr/layer1"/>
<corners android:radius="16dp"/>
</shape>

@ -5,4 +5,4 @@
<org.mozilla.fenix.library.LibrarySiteItemView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?foundation" />
android:background="?attr/layer1" />

@ -117,7 +117,7 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:autofillHints="false"
android:background="?foundation"
android:background="?attr/layer1"
android:focusedByDefault="true"
android:hint="@string/collection_name_hint"
android:imeOptions="actionDone"

@ -60,7 +60,7 @@
android:layout_gravity="bottom|center"
android:alpha="1"
android:autofillHints="false"
android:background="?foundation"
android:background="?attr/layer1"
android:focusedByDefault="true"
android:hint="@string/collection_name_hint"
android:imeOptions="actionDone"

@ -64,7 +64,7 @@
android:layout_gravity="bottom|center"
android:alpha="0"
android:autofillHints="false"
android:background="?foundation"
android:background="?attr/layer1"
android:focusedByDefault="true"
android:hint="@string/collection_name_hint"
android:imeOptions="actionDone"

@ -10,7 +10,7 @@
android:id="@+id/panel_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?foundation">
android:background="?attr/layer1">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/normal_mode"

@ -10,7 +10,7 @@
android:id="@+id/website_info_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?foundation"
android:background="?attr/layer1"
android:orientation="horizontal">
<ImageView

@ -7,7 +7,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?foundation"
android:background="?attr/layer1"
android:paddingBottom="12dp">
<ImageView

@ -56,7 +56,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="?foundation"
android:background="?attr/layer1"
android:elevation="24dp"
android:visibility="gone" />

@ -68,7 +68,7 @@
android:fadingEdgeLength="40dp"
android:nestedScrollingEnabled="false"
android:requiresFadingEdge="vertical"
android:background="?attr/foundation"
android:background="?attr/layer1"
android:visibility="invisible"
app:layout_constraintBottom_toTopOf="@+id/pill_wrapper"
app:layout_constraintEnd_toEndOf="parent"
@ -98,7 +98,7 @@
android:id="@+id/pill_wrapper"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="?foundation"
android:background="?attr/layer1"
android:importantForAccessibility="no"
android:paddingStart="@dimen/search_fragment_pill_padding_start"
android:paddingTop="@dimen/search_fragment_pill_padding_vertical"

@ -14,7 +14,7 @@
android:id="@+id/quick_action_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?foundation">
android:background="?attr/layer1">
<FrameLayout
android:id="@+id/websiteInfoLayout"

@ -67,7 +67,7 @@
android:fadingEdgeLength="40dp"
android:nestedScrollingEnabled="false"
android:requiresFadingEdge="vertical"
android:background="?attr/foundation"
android:background="?attr/layer1"
android:visibility="invisible"
app:layout_constraintBottom_toTopOf="@+id/pill_wrapper"
app:layout_constraintEnd_toEndOf="parent"
@ -78,7 +78,7 @@
android:id="@+id/fill_link_from_clipboard"
android:layout_width="0dp"
android:layout_height="@dimen/search_fragment_clipboard_item_height"
android:background="?foundation"
android:background="?attr/layer1"
android:clickable="true"
android:focusable="true"
android:visibility="gone"
@ -159,7 +159,7 @@
android:id="@+id/pill_wrapper"
android:layout_width="0dp"
android:layout_height="@dimen/search_fragment_pill_height"
android:background="?foundation"
android:background="?attr/layer1"
android:importantForAccessibility="no"
android:paddingStart="@dimen/search_fragment_pill_padding_start"
android:paddingTop="@dimen/search_fragment_pill_padding_vertical"

@ -7,7 +7,7 @@
android:id="@+id/sign_out_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?foundation"
android:background="?attr/layer1"
android:padding="8dp">
<TextView

@ -8,7 +8,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="21dp"
android:background="?foundation"
android:background="?attr/layer1"
android:paddingStart="11dp"
android:paddingTop="21dp"
android:paddingEnd="16dp">

@ -11,7 +11,7 @@
app:titleMarginStart="16dp"
app:titleMarginEnd="16dp"
app:titleTextAppearance="@style/ToolbarTitleTextStyle"
android:background="?foundation"
android:background="?attr/layer1"
android:elevation="8dp">
<FrameLayout

@ -18,7 +18,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/foundation"
android:background="?attr/layer1"
android:paddingStart="20dp"
android:paddingTop="20dp"
android:paddingEnd="20dp"

@ -8,7 +8,7 @@
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_gravity="bottom"
android:background="?foundation"
android:background="?attr/layer1"
android:clickable="true"
android:focusable="true"
app:findInPageNoMatchesTextColor="?attr/destructive"

@ -7,7 +7,7 @@
<item name="android:windowLightStatusBar">false</item>
<!-- Style the navigation bar -->
<item name="android:navigationBarColor">?foundation</item>
<item name="android:navigationBarColor">?attr/layer1</item>
</style>
<style name="TabTrayDialogStyle" parent="TabTrayDialogStyleBase">

@ -11,13 +11,13 @@
<item name="android:windowLightStatusBar">false</item>
<!-- Style the navigation bar -->
<item name="android:navigationBarColor">?foundation</item>
<item name="android:navigationBarColor">?attr/layer1</item>
</style>
<style name="BottomSheetPrivate" parent="BottomSheetBasePrivate">
<item name="android:windowLightStatusBar">false</item>
<!-- Style the navigation bar -->
<item name="android:navigationBarColor">?foundation</item>
<item name="android:navigationBarColor">?attr/layer1</item>
</style>
</resources>

@ -28,8 +28,8 @@
<style name="BottomSheetPrivate" parent="BottomSheetBasePrivate">
<item name="android:windowIsFloating">false</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">?foundation</item>
<item name="android:colorBackground">?foundation</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>
@ -38,8 +38,8 @@
<style name="BottomSheet" parent="BottomSheetBase">
<item name="android:windowIsFloating">false</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">?foundation</item>
<item name="android:colorBackground">?foundation</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>

@ -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 -->
@ -47,7 +49,6 @@
<attr name="accentHighContrast" format="reference" />
<attr name="accentUsedOnDarkBackground" format="reference" />
<attr name="snackbar" format="reference" />
<attr name="foundation" format="reference" />
<attr name="above" format="reference" />
<attr name="neutral" format="reference" />
<attr name="neutralFaded" format="reference" />

@ -34,6 +34,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 -->
@ -82,7 +84,6 @@
<item name="accent">@color/accent_normal_theme</item>
<item name="accentBright">@color/photonViolet70</item>
<item name="accentHighContrast">@color/accent_high_contrast_normal_theme</item>
<item name="foundation">@color/fx_mobile_layer_color_1</item>
<item name="above">@color/fx_mobile_layer_color_2</item>
<item name="neutral">@color/neutral_normal_theme</item>
<item name="neutralFaded">@color/neutral_faded_normal_theme</item>
@ -228,6 +229,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 -->
@ -274,7 +277,6 @@
<item name="accent">@color/accent_private_theme</item>
<item name="accentBright">@color/photonViolet70</item>
<item name="accentHighContrast">@color/accent_high_contrast_private_theme</item>
<item name="foundation">@color/fx_mobile_private_layer_color_1</item>
<item name="above">@color/fx_mobile_private_layer_color_1</item>
<item name="neutral">@color/neutral_private_theme</item>
<item name="neutralFaded">@color/neutral_faded_private_theme</item>

Loading…
Cancel
Save