Adjust large screen header margins in split shade

Changed the header's left padding in split shade so that it aligns with the left margin (40dp). Right padding remains the same (confirmed with the UX).

Change-Id: Ic4b8a2b4bc067a831c269dc08eb6c94dc9daecb0
Fixes: 228058256
Test: Web HV
This commit is contained in:
yyalan
2022-05-09 12:36:58 +01:00
committed by Yalan Yiue
parent b8b70b0a04
commit 2733e14ab5
4 changed files with 10 additions and 1 deletions

View File

@@ -22,7 +22,7 @@
android:minHeight="@dimen/large_screen_shade_header_min_height"
android:clickable="false"
android:focusable="true"
android:paddingLeft="@dimen/qs_panel_padding"
android:paddingLeft="@dimen/large_screen_shade_header_left_padding"
android:paddingRight="@dimen/qs_panel_padding"
android:visibility="gone"
android:theme="@style/Theme.SystemUI.QuickSettings.Header">

View File

@@ -25,6 +25,7 @@
<dimen name="keyguard_status_view_bottom_margin">80dp</dimen>
<dimen name="bouncer_user_switcher_y_trans">90dp</dimen>
<dimen name="large_screen_shade_header_left_padding">24dp</dimen>
<dimen name="qqs_layout_padding_bottom">40dp</dimen>
<dimen name="notification_panel_margin_horizontal">80dp</dimen>

View File

@@ -407,6 +407,7 @@
<!-- Height of status bar in split shade mode - visible only on large screens -->
<dimen name="large_screen_shade_header_height">@*android:dimen/quick_qs_offset_height</dimen>
<dimen name="large_screen_shade_header_min_height">@dimen/qs_header_row_min_height</dimen>
<dimen name="large_screen_shade_header_left_padding">@dimen/qs_horizontal_margin</dimen>
<!-- The top margin of the panel that holds the list of notifications.
On phones it's always 0dp but it's overridden in Car UI

View File

@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.phone
import android.app.StatusBarManager
import android.content.res.Configuration
import android.view.View
import android.widget.TextView
import androidx.constraintlayout.motion.widget.MotionLayout
@@ -204,6 +205,12 @@ class LargeScreenShadeHeaderController @Inject constructor(
private fun bindConfigurationListener() {
val listener = object : ConfigurationController.ConfigurationListener {
override fun onConfigChanged(newConfig: Configuration?) {
val left = header.resources.getDimensionPixelSize(
R.dimen.large_screen_shade_header_left_padding)
header.setPadding(
left, header.paddingTop, header.paddingRight, header.paddingBottom)
}
override fun onDensityOrFontScaleChanged() {
val qsStatusStyle = R.style.TextAppearance_QS_Status
FontSizeUtils.updateFontSizeFromStyle(clock, qsStatusStyle)