From 9086588d3622d4f2e3c750c27aa0fd3b826839ec Mon Sep 17 00:00:00 2001 From: Caitlin Shkuratov Date: Fri, 5 May 2023 15:52:08 +0000 Subject: [PATCH] [Mobile] Show the roaming icon in the top-right on RTL. The old roaming drawable took up the full space of the signal icon, so it couldn't be moved around using gravities alone. Reducing its size to be just the size of the R lets us move it around correctly in RTL. Fixes: 230795372 Test: `adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 2 -e datatype roam -e slot 4 -e roam show` -> see roaming icon in top-left of signal icon. Test: above command in RTL -> see roaming icon in top-right of signal icon. Change-Id: Ie8be70a3c92e88bcfe0a9bdd9610995ccbfd9529 --- packages/SettingsLib/res/values/dimens.xml | 2 ++ .../layout/status_bar_mobile_signal_group_inner.xml | 1 + packages/SystemUI/res/drawable/stat_sys_roaming.xml | 8 ++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/SettingsLib/res/values/dimens.xml b/packages/SettingsLib/res/values/dimens.xml index e9aded0838d94..2372c802168cd 100644 --- a/packages/SettingsLib/res/values/dimens.xml +++ b/packages/SettingsLib/res/values/dimens.xml @@ -67,6 +67,8 @@ 15dp + + 8dp 24dp diff --git a/packages/SystemUI/res-keyguard/layout/status_bar_mobile_signal_group_inner.xml b/packages/SystemUI/res-keyguard/layout/status_bar_mobile_signal_group_inner.xml index 29832a081612d..f050a1ef0f39e 100644 --- a/packages/SystemUI/res-keyguard/layout/status_bar_mobile_signal_group_inner.xml +++ b/packages/SystemUI/res-keyguard/layout/status_bar_mobile_signal_group_inner.xml @@ -78,6 +78,7 @@ android:id="@+id/mobile_roaming" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_gravity="top|start" android:src="@drawable/stat_sys_roaming" android:contentDescription="@string/data_connection_roaming" android:visibility="gone" /> diff --git a/packages/SystemUI/res/drawable/stat_sys_roaming.xml b/packages/SystemUI/res/drawable/stat_sys_roaming.xml index 0dd9f5a39f91f..2dd12ca4e21a3 100644 --- a/packages/SystemUI/res/drawable/stat_sys_roaming.xml +++ b/packages/SystemUI/res/drawable/stat_sys_roaming.xml @@ -14,10 +14,10 @@ limitations under the License. --> + android:width="@dimen/signal_icon_size_roaming" + android:height="@dimen/signal_icon_size_roaming" + android:viewportWidth="8" + android:viewportHeight="8">