Loading packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt +9 −7 Original line number Diff line number Diff line Loading @@ -159,6 +159,7 @@ import androidx.compose.ui.unit.times import androidx.compose.ui.util.fastAll import androidx.compose.ui.viewinterop.AndroidView import androidx.compose.ui.viewinterop.NoOpUpdate import androidx.compose.ui.zIndex import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.window.layout.WindowMetricsCalculator import com.android.compose.animation.Easings.Emphasized Loading Loading @@ -796,6 +797,7 @@ private fun BoxScope.CommunalHubLazyGrid( } if (viewModel.isEditMode && dragDropState != null) { val isItemDragging = dragDropState.draggingItemKey == item.key val outlineAlpha by animateFloatAsState( targetValue = if (selected) 1f else 0f, Loading @@ -812,13 +814,13 @@ private fun BoxScope.CommunalHubLazyGrid( enabled = selected, alpha = { outlineAlpha }, modifier = Modifier.requiredSize(dpSize).thenIf( dragDropState.draggingItemKey != item.key ) { Modifier.requiredSize(dpSize) .thenIf(!isItemDragging) { Modifier.animateItem( placementSpec = spring(stiffness = Spring.StiffnessMediumLow) ) }, } .thenIf(isItemDragging) { Modifier.zIndex(1f) }, onResize = { resizeInfo -> contentListState.resize(index, resizeInfo) }, minHeightPx = widgetSizeInfo.minHeightPx, maxHeightPx = widgetSizeInfo.maxHeightPx, Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt +9 −7 Original line number Diff line number Diff line Loading @@ -159,6 +159,7 @@ import androidx.compose.ui.unit.times import androidx.compose.ui.util.fastAll import androidx.compose.ui.viewinterop.AndroidView import androidx.compose.ui.viewinterop.NoOpUpdate import androidx.compose.ui.zIndex import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.window.layout.WindowMetricsCalculator import com.android.compose.animation.Easings.Emphasized Loading Loading @@ -796,6 +797,7 @@ private fun BoxScope.CommunalHubLazyGrid( } if (viewModel.isEditMode && dragDropState != null) { val isItemDragging = dragDropState.draggingItemKey == item.key val outlineAlpha by animateFloatAsState( targetValue = if (selected) 1f else 0f, Loading @@ -812,13 +814,13 @@ private fun BoxScope.CommunalHubLazyGrid( enabled = selected, alpha = { outlineAlpha }, modifier = Modifier.requiredSize(dpSize).thenIf( dragDropState.draggingItemKey != item.key ) { Modifier.requiredSize(dpSize) .thenIf(!isItemDragging) { Modifier.animateItem( placementSpec = spring(stiffness = Spring.StiffnessMediumLow) ) }, } .thenIf(isItemDragging) { Modifier.zIndex(1f) }, onResize = { resizeInfo -> contentListState.resize(index, resizeInfo) }, minHeightPx = widgetSizeInfo.minHeightPx, maxHeightPx = widgetSizeInfo.maxHeightPx, Loading