From 5bcab675a8824ff9d59f65620614918521a52357 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Wed, 25 Nov 2020 13:16:58 -0500 Subject: [PATCH] AOD/LS - RTL adjustments Slightly update large clock size. Fix smartspace text alignment for RTL languages and use relative alignment for images within the text. Bug: 172360102 Test: manual Change-Id: I8fdf1ac8789a8ca75ed97f369bdbd5de40a616d7 --- .../res-keyguard/layout/keyguard_clock_switch.xml | 2 +- .../src/com/android/keyguard/KeyguardSliceView.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml index b75c2c4cea6c3..c82bda6620bd7 100644 --- a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml +++ b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml @@ -95,7 +95,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:gravity="center_horizontal" - android:textSize="170dp" + android:textSize="180dp" android:letterSpacing="0.02" android:lineSpacingMultiplier=".8" android:includeFontPadding="false" diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java index a32cd1420fdce..3cbab8e66fdb8 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java @@ -244,7 +244,7 @@ public class KeyguardSliceView extends LinearLayout { iconDrawable.setBounds(0, 0, Math.max(width, 1), iconSize); } } - button.setCompoundDrawables(iconDrawable, null, null, null); + button.setCompoundDrawablesRelative(iconDrawable, null, null, null); button.setOnClickListener(mOnClickListener); button.setClickable(pendingIntent != null); } @@ -536,9 +536,9 @@ public class KeyguardSliceView extends LinearLayout { } @Override - public void setCompoundDrawables(Drawable left, Drawable top, Drawable right, + public void setCompoundDrawablesRelative(Drawable start, Drawable top, Drawable end, Drawable bottom) { - super.setCompoundDrawables(left, top, right, bottom); + super.setCompoundDrawablesRelative(start, top, end, bottom); updateDrawableColors(); updatePadding(); } @@ -558,9 +558,9 @@ public class KeyguardSliceView extends LinearLayout { public void setLockScreenMode(int mode) { mLockScreenMode = mode; if (mLockScreenMode == KeyguardUpdateMonitor.LOCK_SCREEN_MODE_LAYOUT_1) { - setGravity(Gravity.START); + setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START); } else { - setGravity(Gravity.CENTER); + setTextAlignment(View.TEXT_ALIGNMENT_CENTER); } updatePadding(); }