Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79323323 authored by Evan Laird's avatar Evan Laird
Browse files

[wifi] set adjustViewBounds on the modern wifi view

The way our layouts for mobile/wifi work currently is that we
want to use wrap_content when NewStatusBarIcons is on, but the old wifi
layout doesn't use that property of ImageView.

The bug: with NewStatusBarIcons enabled, the wifi icon doesn't resize
with the font size setting correctly

The fix: settings ImageView.adjustViewBounds will resize the ImageView
and allow the wrap_content property to work correctly.

Test: manual
Bug: 402608850
Flag: com.android.settingslib.flags.new_status_bar_icons
Flag: com.android.systemui.status_bar_root_modernization
Change-Id: I03c8e2e886f9546a8e8457042391ef00184a2b42
parent 91d69f94
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ class ModernStatusBarWifiView(context: Context, attrs: AttributeSet?) :
                        // The newer asset does not embed whitespace around it, and is therefore
                        // rectangular. Use wrap_content for the width in this case
                        val iconView = requireViewById<ImageView>(R.id.wifi_signal)
                        iconView.adjustViewBounds = true
                        val lp = iconView.layoutParams
                        lp.width = ViewGroup.LayoutParams.WRAP_CONTENT
                        lp.height =