Merge "Android U: GM3 Color Tokens for Taskbar and quickstep" into udc-dev am: 990aef6c00 am: 97ec1855a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23220591 Change-Id: I410846f848704b706afb6af4d1b5718cbf0062f3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="@android:color/system_neutral2_700"/>
|
||||||
|
</selector>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="@android:color/system_neutral2_200"/>
|
||||||
|
</selector>
|
||||||
@@ -18,5 +18,5 @@
|
|||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
|
|
||||||
<corners android:radius="@dimen/dialogCornerRadius" />
|
<corners android:radius="@dimen/dialogCornerRadius" />
|
||||||
<solid android:color="?androidprv:attr/colorSurface" />
|
<solid android:color="?androidprv:attr/materialColorSurfaceBright"/>
|
||||||
</shape>
|
</shape>
|
||||||
@@ -15,14 +15,13 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<inset
|
<inset
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
|
||||||
<ripple
|
<ripple
|
||||||
android:color="?android:attr/colorControlHighlight">
|
android:color="?android:attr/colorControlHighlight">
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<corners android:radius="16dp"/>
|
<corners android:radius="16dp"/>
|
||||||
<solid android:color="?androidprv:attr/colorAccentPrimary"/>
|
<solid android:color="@color/taskbar_edu_button_color"/>
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
</ripple>
|
</ripple>
|
||||||
|
|||||||
@@ -25,10 +25,6 @@
|
|||||||
|
|
||||||
<!-- Taskbar -->
|
<!-- Taskbar -->
|
||||||
<color name="taskbar_nav_icon_selection_ripple">#E0E0E0</color>
|
<color name="taskbar_nav_icon_selection_ripple">#E0E0E0</color>
|
||||||
<color name="taskbar_nav_icon_light_color">#ffffff</color>
|
|
||||||
<!-- The dark navigation button color is only used in the rare cases that taskbar isn't drawing
|
|
||||||
its background and the underlying app has requested dark buttons. -->
|
|
||||||
<color name="taskbar_nav_icon_dark_color">#99000000</color>
|
|
||||||
<color name="taskbar_stashed_handle_light_color">#EBffffff</color>
|
<color name="taskbar_stashed_handle_light_color">#EBffffff</color>
|
||||||
<color name="taskbar_stashed_handle_dark_color">#99000000</color>
|
<color name="taskbar_stashed_handle_dark_color">#99000000</color>
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import android.annotation.SuppressLint
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.graphics.Rect
|
import android.graphics.Rect
|
||||||
|
import android.graphics.drawable.GradientDrawable
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
@@ -138,9 +139,29 @@ constructor(
|
|||||||
|
|
||||||
private fun populateForView(view: View): TaskbarDividerPopupView<*> {
|
private fun populateForView(view: View): TaskbarDividerPopupView<*> {
|
||||||
dividerView = view
|
dividerView = view
|
||||||
|
tryUpdateBackground()
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Updates the text background to match the shape of this background (when applicable). */
|
||||||
|
private fun tryUpdateBackground() {
|
||||||
|
if (background !is GradientDrawable) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
val background = background as GradientDrawable
|
||||||
|
val color = context.getColor(R.color.popup_shade_first)
|
||||||
|
val backgroundMask = GradientDrawable()
|
||||||
|
backgroundMask.setColor(color)
|
||||||
|
backgroundMask.shape = GradientDrawable.RECTANGLE
|
||||||
|
if (background.cornerRadii != null) {
|
||||||
|
backgroundMask.cornerRadii = background.cornerRadii
|
||||||
|
} else {
|
||||||
|
backgroundMask.cornerRadius = background.cornerRadius
|
||||||
|
}
|
||||||
|
|
||||||
|
setBackground(backgroundMask)
|
||||||
|
}
|
||||||
|
|
||||||
override fun addArrow() {
|
override fun addArrow() {
|
||||||
super.addArrow()
|
super.addArrow()
|
||||||
// Change arrow location to the middle of popup.
|
// Change arrow location to the middle of popup.
|
||||||
@@ -161,7 +182,7 @@ constructor(
|
|||||||
0f, // arrowOffsetY
|
0f, // arrowOffsetY
|
||||||
false, // isPointingUp
|
false, // isPointingUp
|
||||||
true, // leftAligned
|
true, // leftAligned
|
||||||
Themes.getAttrColor(context, R.attr.popupColorPrimary),
|
context.getColor(R.color.popup_shade_first),
|
||||||
)
|
)
|
||||||
elevation = mElevation
|
elevation = mElevation
|
||||||
mArrow.elevation = mElevation
|
mArrow.elevation = mElevation
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ constructor(
|
|||||||
private val activityContext: ActivityContext = ActivityContext.lookupContext(context)
|
private val activityContext: ActivityContext = ActivityContext.lookupContext(context)
|
||||||
|
|
||||||
private val backgroundColor =
|
private val backgroundColor =
|
||||||
Themes.getAttrColor(context, com.android.internal.R.attr.colorSurface)
|
Themes.getAttrColor(context, com.android.internal.R.attr.materialColorSurfaceBright)
|
||||||
|
|
||||||
private val tooltipCornerRadius = Themes.getDialogCornerRadius(context)
|
private val tooltipCornerRadius = Themes.getDialogCornerRadius(context)
|
||||||
private val arrowWidth = resources.getDimension(R.dimen.popup_arrow_width)
|
private val arrowWidth = resources.getDimension(R.dimen.popup_arrow_width)
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="@android:color/system_neutral2_500" android:lStar="80" />
|
||||||
|
</selector>
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2021 The Android Open Source Project
|
||||||
<!-- Copyright (C) 2021 The Android Open Source Project
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -13,8 +12,7 @@
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<item
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||||
android:color="?attr/popupColorPrimary"
|
<item android:color="?androidprv:attr/materialColorSurfaceContainer"/>
|
||||||
android:lStar="20" />
|
|
||||||
</selector>
|
</selector>
|
||||||
|
|||||||
@@ -14,5 +14,5 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="@android:color/system_neutral1_500" android:lStar="20" />
|
<item android:color="@android:color/system_neutral1_500" android:lStar="6" />
|
||||||
</selector>
|
</selector>
|
||||||
|
|||||||
@@ -14,5 +14,5 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="#797869" android:lStar="60" />
|
<item android:color="@android:color/system_neutral1_500" android:lStar="60" />
|
||||||
</selector>
|
</selector>
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="@android:color/system_neutral2_500" android:lStar="30" />
|
||||||
|
</selector>
|
||||||
@@ -13,8 +13,7 @@
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<item
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||||
android:color="?attr/popupColorPrimary"
|
<item android:color="?androidprv:attr/materialColorSurfaceContainer"/>
|
||||||
android:lStar="98" />
|
|
||||||
</selector>
|
</selector>
|
||||||
|
|||||||
@@ -14,5 +14,5 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="#797869" android:lStar="50" />
|
<item android:color="@android:color/system_neutral2_500" android:lStar="50" />
|
||||||
</selector>
|
</selector>
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="@android:color/system_accent1_100"/>
|
||||||
|
</selector>
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<item android:color="?attr/popupShadeFirst" />
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||||
|
<item android:color="?androidprv:attr/materialColorSurfaceContainer"/>
|
||||||
</selector>
|
</selector>
|
||||||
|
|||||||
@@ -25,8 +25,6 @@
|
|||||||
<color name="home_settings_track_on_color">@android:color/system_accent2_700</color>
|
<color name="home_settings_track_on_color">@android:color/system_accent2_700</color>
|
||||||
<color name="home_settings_track_off_color">@android:color/system_neutral1_700</color>
|
<color name="home_settings_track_off_color">@android:color/system_neutral1_700</color>
|
||||||
|
|
||||||
<color name="all_apps_button_color">@android:color/system_neutral2_200</color>
|
|
||||||
|
|
||||||
<color name="widget_picker_title_color_dark">@android:color/system_neutral1_100</color>
|
<color name="widget_picker_title_color_dark">@android:color/system_neutral1_100</color>
|
||||||
<color name="widget_picker_header_app_title_color_dark">
|
<color name="widget_picker_header_app_title_color_dark">
|
||||||
@android:color/system_neutral1_100</color>
|
@android:color/system_neutral1_100</color>
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?><!--
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 The Android Open Source Project
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
-->
|
|
||||||
|
|
||||||
<resources>
|
|
||||||
<color name="all_apps_button_color">#BFC8CC</color>
|
|
||||||
</resources>
|
|
||||||
@@ -73,8 +73,6 @@
|
|||||||
<color name="preload_icon_accent_color_dark">@android:color/system_accent1_300</color>
|
<color name="preload_icon_accent_color_dark">@android:color/system_accent1_300</color>
|
||||||
<color name="preload_icon_background_color_dark">@android:color/system_neutral2_700</color>
|
<color name="preload_icon_background_color_dark">@android:color/system_neutral2_700</color>
|
||||||
|
|
||||||
<color name="all_apps_button_color">@android:color/system_neutral2_700</color>
|
|
||||||
|
|
||||||
<color name="widget_picker_title_color_light">
|
<color name="widget_picker_title_color_light">
|
||||||
@android:color/system_neutral1_900</color>
|
@android:color/system_neutral1_900</color>
|
||||||
<color name="widget_picker_header_app_title_color_light">
|
<color name="widget_picker_header_app_title_color_light">
|
||||||
|
|||||||
@@ -90,8 +90,6 @@
|
|||||||
<color name="drop_target_hover_button_color_light">#D3E3FD</color>
|
<color name="drop_target_hover_button_color_light">#D3E3FD</color>
|
||||||
<color name="drop_target_hover_button_color_dark">#0842A0</color>
|
<color name="drop_target_hover_button_color_dark">#0842A0</color>
|
||||||
|
|
||||||
<color name="all_apps_button_color">#40484B</color>
|
|
||||||
|
|
||||||
<color name="preload_icon_accent_color_light">#00668B</color>
|
<color name="preload_icon_accent_color_light">#00668B</color>
|
||||||
<color name="preload_icon_background_color_light">#B5CAD7</color>
|
<color name="preload_icon_background_color_light">#B5CAD7</color>
|
||||||
<color name="preload_icon_accent_color_dark">#4BB6E8</color>
|
<color name="preload_icon_accent_color_dark">#4BB6E8</color>
|
||||||
|
|||||||
Reference in New Issue
Block a user