Loading packages/SystemUI/res/values/dimens.xml +1 −1 Original line number Original line Diff line number Diff line Loading @@ -1371,7 +1371,7 @@ <dimen name="controls_app_divider_height">2dp</dimen> <dimen name="controls_app_divider_height">2dp</dimen> <dimen name="controls_app_divider_side_margin">32dp</dimen> <dimen name="controls_app_divider_side_margin">32dp</dimen> <dimen name="controls_card_margin">2dp</dimen> <dimen name="controls_card_margin">@dimen/control_base_item_margin</dimen> <item name="control_card_elevation" type="dimen" format="float">15</item> <item name="control_card_elevation" type="dimen" format="float">15</item> <dimen name="controls_dialog_padding">32dp</dimen> <dimen name="controls_dialog_padding">32dp</dimen> Loading packages/SystemUI/src/com/android/systemui/controls/management/ControlAdapter.kt +7 −2 Original line number Original line Diff line number Diff line Loading @@ -72,8 +72,13 @@ class ControlAdapter( TYPE_CONTROL -> { TYPE_CONTROL -> { ControlHolder( ControlHolder( layoutInflater.inflate(R.layout.controls_base_item, parent, false).apply { layoutInflater.inflate(R.layout.controls_base_item, parent, false).apply { layoutParams.apply { (layoutParams as ViewGroup.MarginLayoutParams).apply { width = ViewGroup.LayoutParams.MATCH_PARENT width = ViewGroup.LayoutParams.MATCH_PARENT // Reset margins as they will be set through the decoration topMargin = 0 bottomMargin = 0 leftMargin = 0 rightMargin = 0 } } elevation = this@ControlAdapter.elevation elevation = this@ControlAdapter.elevation background = parent.context.getDrawable( background = parent.context.getDrawable( Loading Loading @@ -386,7 +391,7 @@ class MarginItemDecorator( val type = parent.adapter?.getItemViewType(position) val type = parent.adapter?.getItemViewType(position) if (type == ControlAdapter.TYPE_CONTROL) { if (type == ControlAdapter.TYPE_CONTROL) { outRect.apply { outRect.apply { top = topMargin top = topMargin * 2 // Use double margin, as we are not setting bottom left = sideMargins left = sideMargins right = sideMargins right = sideMargins bottom = 0 bottom = 0 Loading Loading
packages/SystemUI/res/values/dimens.xml +1 −1 Original line number Original line Diff line number Diff line Loading @@ -1371,7 +1371,7 @@ <dimen name="controls_app_divider_height">2dp</dimen> <dimen name="controls_app_divider_height">2dp</dimen> <dimen name="controls_app_divider_side_margin">32dp</dimen> <dimen name="controls_app_divider_side_margin">32dp</dimen> <dimen name="controls_card_margin">2dp</dimen> <dimen name="controls_card_margin">@dimen/control_base_item_margin</dimen> <item name="control_card_elevation" type="dimen" format="float">15</item> <item name="control_card_elevation" type="dimen" format="float">15</item> <dimen name="controls_dialog_padding">32dp</dimen> <dimen name="controls_dialog_padding">32dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/controls/management/ControlAdapter.kt +7 −2 Original line number Original line Diff line number Diff line Loading @@ -72,8 +72,13 @@ class ControlAdapter( TYPE_CONTROL -> { TYPE_CONTROL -> { ControlHolder( ControlHolder( layoutInflater.inflate(R.layout.controls_base_item, parent, false).apply { layoutInflater.inflate(R.layout.controls_base_item, parent, false).apply { layoutParams.apply { (layoutParams as ViewGroup.MarginLayoutParams).apply { width = ViewGroup.LayoutParams.MATCH_PARENT width = ViewGroup.LayoutParams.MATCH_PARENT // Reset margins as they will be set through the decoration topMargin = 0 bottomMargin = 0 leftMargin = 0 rightMargin = 0 } } elevation = this@ControlAdapter.elevation elevation = this@ControlAdapter.elevation background = parent.context.getDrawable( background = parent.context.getDrawable( Loading Loading @@ -386,7 +391,7 @@ class MarginItemDecorator( val type = parent.adapter?.getItemViewType(position) val type = parent.adapter?.getItemViewType(position) if (type == ControlAdapter.TYPE_CONTROL) { if (type == ControlAdapter.TYPE_CONTROL) { outRect.apply { outRect.apply { top = topMargin top = topMargin * 2 // Use double margin, as we are not setting bottom left = sideMargins left = sideMargins right = sideMargins right = sideMargins bottom = 0 bottom = 0 Loading