Fixed
Status Update
Comments
ti...@google.com <ti...@google.com>
co...@google.com <co...@google.com>
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit c9cf25062fed6a75c01e6fb7bad692ad6320a6e9
Author: Leticia Santos <leticiars@google.com>
Date: Wed Dec 06 13:33:47 2023
[NavigationSuiteScaffold] Fixed navigation component filling entire screen when root surface has modifier.fillMaxSize
When using Surface with fillMaxSize it tries to fill its entire available space with the first composable it finds, but wrapping that composable in a Box prevents that.
Test: manually tested
Bug: 312664933
Change-Id: Ifd23d070ab09f1750384d42ef43a5dc252fac560
M compose/material3/material3-adaptive-navigation-suite/src/commonMain/kotlin/androidx/compose/material3/adaptive/navigation-suite/NavigationSuiteScaffold.kt
https://android-review.googlesource.com/2861890
Branch: androidx-main
commit c9cf25062fed6a75c01e6fb7bad692ad6320a6e9
Author: Leticia Santos <leticiars@google.com>
Date: Wed Dec 06 13:33:47 2023
[NavigationSuiteScaffold] Fixed navigation component filling entire screen when root surface has modifier.fillMaxSize
When using Surface with fillMaxSize it tries to fill its entire available space with the first composable it finds, but wrapping that composable in a Box prevents that.
Test: manually tested
Bug: 312664933
Change-Id: Ifd23d070ab09f1750384d42ef43a5dc252fac560
M compose/material3/material3-adaptive-navigation-suite/src/commonMain/kotlin/androidx/compose/material3/adaptive/navigation-suite/NavigationSuiteScaffold.kt
ma...@google.com <ma...@google.com>
ja...@gmail.com <ja...@gmail.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3-adaptive-navigation-suite:1.0.0-alpha02
androidx.compose.material3:material3-adaptive-navigation-suite-android:1.0.0-alpha02
androidx.compose.material3:material3-adaptive-navigation-suite-desktop:1.0.0-alpha02
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit f6f510999615b25e0a1c118f1136a40bdef6f31f
Author: Leticia Santos <leticiars@google.com>
Date: Tue Jan 23 15:23:34 2024
[NavigationSuiteScaffold] Add some tests.
These tests are related to aosp/2861890
Test: self
Bug: 312664933
Change-Id: I63bda11216f0fc36927ce0b694b82490203ead03
A compose/material3/material3-adaptive-navigation-suite/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive-navigation-suite/NavigationSuiteScaffoldTest.kt
https://android-review.googlesource.com/2924390
Branch: androidx-main
commit f6f510999615b25e0a1c118f1136a40bdef6f31f
Author: Leticia Santos <leticiars@google.com>
Date: Tue Jan 23 15:23:34 2024
[NavigationSuiteScaffold] Add some tests.
These tests are related to aosp/2861890
Test: self
Bug: 312664933
Change-Id: I63bda11216f0fc36927ce0b694b82490203ead03
A compose/material3/material3-adaptive-navigation-suite/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive-navigation-suite/NavigationSuiteScaffoldTest.kt
ma...@google.com <ma...@google.com>
vi...@gmail.com <vi...@gmail.com> #5
Since offset.y is now always added, what is the recommendation for handling the offset when the popup is top aligned? Is there a mechanism to know that so that I can apply a negative offset to shift it up?
Description
compose-bom = "2023.06.01"
compose-compiler = "1.5.1"
Jetpack Compose component(s) used:
DropdownMenu
Android Studio Build:
Android Studio Giraffe | 2022.3.1
Kotlin version:
1.9.0
Emulator version:
33.1.6
Emulated device:
Pixel 4 (33 api) + google services
Steps to Reproduce or Code Sample to Reproduce:
With i use y offset value from -127.dp to -231.dp DropdownMenu draw in incorrect location
Sample
```
import android.util.Log
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.DropdownMenu
import androidx.compose.material.DropdownMenuItem
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.DpOffset
import androidx.compose.ui.unit.dp
@Composable
private fun Test() {
var expanded by remember {
mutableStateOf(false)
}
var yOffset by remember {
mutableStateOf((-125).dp)
}
Box(
modifier = Modifier
.fillMaxSize()
.clickable {
yOffset -= 1.dp
expanded = true
},
contentAlignment = Alignment.Center,
) {
Text(text = "Current offset: $yOffset")
val menuOffset = remember(yOffset) {
DpOffset(200.dp, yOffset).also {
Log.d("TestOffset", "OFFSET = $it")
}
}
DropdownMenu(
expanded = expanded,
offset = menuOffset,
onDismissRequest = { expanded = false },
) {
DropdownMenuItem(onClick = { /*TODO*/ }) {
Text(text = "Item 1")
}
DropdownMenuItem(onClick = { /*TODO*/ }) {
Text(text = "Item 2")
}
DropdownMenuItem(onClick = { /*TODO*/ }) {
Text(text = "Item 3")
}
}
}
}
@Preview
@Composable
fun TestPreview() {
Test()
}
```