Update home controls button on keyguard

- change scale type to fitCenter so size of the icon responds to size of
  the container
- add padding around the icon so it doesn't fill the container
  completely

The home controls button looks the same visually. This change allows
overrides for large screen devices.

Test: verify the home controls button on keyguard looks the same
Bug: 274661719
Change-Id: Ia451d9bfe7f488545df156ea71ddcc0cd916e11b
This commit is contained in:
Darrell Shi
2023-03-23 22:05:03 +00:00
parent 0cbdbb64c8
commit 84ad00e48e
2 changed files with 5 additions and 2 deletions

View File

@@ -64,7 +64,8 @@
android:layout_height="@dimen/keyguard_affordance_fixed_height"
android:layout_width="@dimen/keyguard_affordance_fixed_width"
android:layout_gravity="bottom|start"
android:scaleType="center"
android:scaleType="fitCenter"
android:padding="@dimen/keyguard_affordance_fixed_padding"
android:tint="?android:attr/textColorPrimary"
android:background="@drawable/keyguard_bottom_affordance_bg"
android:foreground="@drawable/keyguard_bottom_affordance_selected_border"
@@ -77,7 +78,8 @@
android:layout_height="@dimen/keyguard_affordance_fixed_height"
android:layout_width="@dimen/keyguard_affordance_fixed_width"
android:layout_gravity="bottom|end"
android:scaleType="center"
android:scaleType="fitCenter"
android:padding="@dimen/keyguard_affordance_fixed_padding"
android:tint="?android:attr/textColorPrimary"
android:background="@drawable/keyguard_bottom_affordance_bg"
android:foreground="@drawable/keyguard_bottom_affordance_selected_border"

View File

@@ -800,6 +800,7 @@
<dimen name="keyguard_affordance_fixed_height">48dp</dimen>
<dimen name="keyguard_affordance_fixed_width">48dp</dimen>
<dimen name="keyguard_affordance_fixed_radius">24dp</dimen>
<dimen name="keyguard_affordance_fixed_padding">12dp</dimen>
<!-- Amount the button should shake when it's not long-pressed for long enough. -->
<dimen name="keyguard_affordance_shake_amplitude">8dp</dimen>