summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Caitlin Shkuratov <caitlinshk@google.com> 2023-05-05 15:52:08 +0000
committer Caitlin Shkuratov <caitlinshk@google.com> 2023-05-05 15:52:08 +0000
commit9086588d3622d4f2e3c750c27aa0fd3b826839ec (patch)
treef868dca75013707c530c7cbd218cd48af4942880
parente6d80348a582d044ad14bddccd4016cbb1cde900 (diff)
[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
-rw-r--r--packages/SettingsLib/res/values/dimens.xml2
-rw-r--r--packages/SystemUI/res-keyguard/layout/status_bar_mobile_signal_group_inner.xml1
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_roaming.xml8
3 files changed, 7 insertions, 4 deletions
diff --git a/packages/SettingsLib/res/values/dimens.xml b/packages/SettingsLib/res/values/dimens.xml
index e9aded0838d9..2372c802168c 100644
--- a/packages/SettingsLib/res/values/dimens.xml
+++ b/packages/SettingsLib/res/values/dimens.xml
@@ -67,6 +67,8 @@
<!-- SignalDrawable -->
<dimen name="signal_icon_size">15dp</dimen>
+ <!-- The size of the roaming icon in the top-left corner of the signal icon. -->
+ <dimen name="signal_icon_size_roaming">8dp</dimen>
<!-- Size of nearby icon -->
<dimen name="bt_nearby_icon_size">24dp</dimen>
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 29832a081612..f050a1ef0f39 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 0dd9f5a39f91..2dd12ca4e21a 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="@dimen/signal_icon_size"
- android:height="@dimen/signal_icon_size"
- android:viewportWidth="17"
- android:viewportHeight="17">
+ android:width="@dimen/signal_icon_size_roaming"
+ android:height="@dimen/signal_icon_size_roaming"
+ android:viewportWidth="8"
+ android:viewportHeight="8">
<path
android:fillColor="#FFFFFFFF"