Merge "Adjust large screen header margins in split shade" into tm-qpr-dev

This commit is contained in:
Yalan Yiue
2022-06-08 16:16:10 +00:00
committed by Android (Google) Code Review
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:minHeight="@dimen/large_screen_shade_header_min_height"
android:clickable="false" android:clickable="false"
android:focusable="true" 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:paddingRight="@dimen/qs_panel_padding"
android:visibility="gone" android:visibility="gone"
android:theme="@style/Theme.SystemUI.QuickSettings.Header"> android:theme="@style/Theme.SystemUI.QuickSettings.Header">

View File

@@ -25,6 +25,7 @@
<dimen name="keyguard_status_view_bottom_margin">80dp</dimen> <dimen name="keyguard_status_view_bottom_margin">80dp</dimen>
<dimen name="bouncer_user_switcher_y_trans">90dp</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="qqs_layout_padding_bottom">40dp</dimen>
<dimen name="notification_panel_margin_horizontal">80dp</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 --> <!-- 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_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_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. <!-- 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 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 package com.android.systemui.statusbar.phone
import android.app.StatusBarManager import android.app.StatusBarManager
import android.content.res.Configuration
import android.view.View import android.view.View
import android.widget.TextView import android.widget.TextView
import androidx.constraintlayout.motion.widget.MotionLayout import androidx.constraintlayout.motion.widget.MotionLayout
@@ -204,6 +205,12 @@ class LargeScreenShadeHeaderController @Inject constructor(
private fun bindConfigurationListener() { private fun bindConfigurationListener() {
val listener = object : ConfigurationController.ConfigurationListener { 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() { override fun onDensityOrFontScaleChanged() {
val qsStatusStyle = R.style.TextAppearance_QS_Status val qsStatusStyle = R.style.TextAppearance_QS_Status
FontSizeUtils.updateFontSizeFromStyle(clock, qsStatusStyle) FontSizeUtils.updateFontSizeFromStyle(clock, qsStatusStyle)