summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Coco Duan <cocod@google.com> 2023-03-09 23:06:08 +0000
committer Coco Duan <cocod@google.com> 2023-03-10 17:30:26 +0000
commitfb8fa9238e496a43f3e82061fa55190ebbe3d58f (patch)
treef0f7683291f8c6682561f8c9d99e10ff2e1a77f8
parent64d3a0e656a9b491dd432abef98a8ff60184722e (diff)
[Overlay] Adjust Home Controls button size
- Create a new drawable shape as the background of the dream overlay bottom affordance icon. - Scale the controls_icon based on design spec to make it bigger. Bug: 271328155 Test: manual on device Change-Id: Idb25059827ed489bebc878ece5662ebf3d491d29
-rw-r--r--packages/SystemUI/res/drawable/dream_overlay_bottom_affordance_bg.xml28
-rw-r--r--packages/SystemUI/res/layout/dream_overlay_home_controls_chip.xml9
-rw-r--r--packages/SystemUI/res/values/dimens.xml4
3 files changed, 37 insertions, 4 deletions
diff --git a/packages/SystemUI/res/drawable/dream_overlay_bottom_affordance_bg.xml b/packages/SystemUI/res/drawable/dream_overlay_bottom_affordance_bg.xml
new file mode 100644
index 000000000000..3b67ddd02d78
--- /dev/null
+++ b/packages/SystemUI/res/drawable/dream_overlay_bottom_affordance_bg.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright 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.
+*/
+-->
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ android:shape="rectangle">
+ <solid android:color="?androidprv:attr/colorSurface"/>
+ <size
+ android:width="@dimen/dream_overlay_bottom_affordance_height"
+ android:height="@dimen/dream_overlay_bottom_affordance_width"/>
+ <corners android:radius="@dimen/dream_overlay_bottom_affordance_radius" />
+</shape>
diff --git a/packages/SystemUI/res/layout/dream_overlay_home_controls_chip.xml b/packages/SystemUI/res/layout/dream_overlay_home_controls_chip.xml
index fb78b49dfcc2..5b2ec483f50e 100644
--- a/packages/SystemUI/res/layout/dream_overlay_home_controls_chip.xml
+++ b/packages/SystemUI/res/layout/dream_overlay_home_controls_chip.xml
@@ -22,13 +22,14 @@
<com.android.systemui.animation.view.LaunchableImageView
android:id="@+id/home_controls_chip"
- android:layout_height="@dimen/keyguard_affordance_fixed_height"
- android:layout_width="@dimen/keyguard_affordance_fixed_width"
+ android:layout_height="@dimen/dream_overlay_bottom_affordance_height"
+ android:layout_width="@dimen/dream_overlay_bottom_affordance_width"
android:layout_gravity="bottom|start"
- android:scaleType="center"
+ android:padding="@dimen/dream_overlay_bottom_affordance_padding"
+ android:background="@drawable/dream_overlay_bottom_affordance_bg"
+ android:scaleType="fitCenter"
android:tint="?android:attr/textColorPrimary"
android:src="@drawable/controls_icon"
- android:background="@drawable/keyguard_bottom_affordance_bg"
android:contentDescription="@string/quick_controls_title" />
</FrameLayout>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 35fc9b69e1f4..82eeef494fae 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -1584,6 +1584,10 @@
<!-- Dream overlay complications related dimensions -->
<!-- The blur radius applied to the dream overlay when entering and exiting dreams -->
<dimen name="dream_overlay_anim_blur_radius">50dp</dimen>
+ <dimen name="dream_overlay_bottom_affordance_height">64dp</dimen>
+ <dimen name="dream_overlay_bottom_affordance_width">64dp</dimen>
+ <dimen name="dream_overlay_bottom_affordance_radius">32dp</dimen>
+ <dimen name="dream_overlay_bottom_affordance_padding">14dp</dimen>
<dimen name="dream_overlay_complication_clock_time_text_size">86dp</dimen>
<dimen name="dream_overlay_complication_clock_time_translation_y">28dp</dimen>
<dimen name="dream_overlay_complication_home_controls_padding">28dp</dimen>