Skip to content

Commit

Permalink
Merge "[bc25] Support both horizontal and vertical alignment in dual …
Browse files Browse the repository at this point in the history
…shade." into main
  • Loading branch information
Treehugger Robot authored and Android (Google) Code Review committed Jun 4, 2024
2 parents c2e9ad2 + 51ea31d commit a71e4b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

package com.android.systemui.notifications.ui.composable

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.android.compose.animation.scene.SceneScope
Expand Down Expand Up @@ -75,7 +75,7 @@ constructor(
OverlayShade(
modifier = modifier,
viewModel = overlayShadeViewModel,
horizontalArrangement = Arrangement.End,
panelAlignment = Alignment.TopEnd,
lockscreenContent = lockscreenContent,
) {
Column {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ constructor(
) {
OverlayShade(
viewModel = viewModel.overlayShadeViewModel,
horizontalArrangement = Arrangement.End,
panelAlignment = Alignment.TopEnd,
lockscreenContent = lockscreenContent,
modifier = modifier,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ package com.android.systemui.shade.ui.composable

import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues
Expand All @@ -43,6 +41,7 @@ import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
Expand All @@ -64,7 +63,7 @@ import java.util.Optional
@Composable
fun SceneScope.OverlayShade(
viewModel: OverlayShadeViewModel,
horizontalArrangement: Arrangement.Horizontal,
panelAlignment: Alignment,
lockscreenContent: Lazy<Optional<LockscreenContent>>,
modifier: Modifier = Modifier,
content: @Composable () -> Unit,
Expand All @@ -81,9 +80,9 @@ fun SceneScope.OverlayShade(

Scrim(onClicked = viewModel::onScrimClicked)

Row(
Box(
modifier = Modifier.fillMaxSize().panelPadding(),
horizontalArrangement = horizontalArrangement,
contentAlignment = panelAlignment,
) {
Panel(
modifier = Modifier.element(OverlayShade.Elements.Panel).panelSize(),
Expand Down

0 comments on commit a71e4b4

Please sign in to comment.