Status Update
Comments
su...@google.com <su...@google.com> #2
This also brings back dialog content size animations issues :( But on all devices this time.
See attached video
Repro:
Dialog(
onDismissRequest = {
if (dialogState.canDismiss.value) {
dialogNavigator.hide()
}
},
properties = properties,
content = {
Surface(
modifier = modifier
.safeContentPadding()
.fillMaxWidth(0.8f)
.animateContentSize(),
shape = shape,
color = backgroundColor,
contentColor = contentColor,
) {
.....A composable that change it's size
}
},
)
ch...@gmail.com <ch...@gmail.com> #3
Can you give a fuller example for the animateContentSize()
problem?
[Deleted User] <[Deleted User]> #4
It does that for all the cases where the content change.
properties = DialogProperties(usePlatformDefaultWidth = false)
var show by remember { mutableStateOf(false) }
LaunchedEffect(Unit) {
delay(1000)
show = true
}
Column {
Text("X")
if (show) {
Text"Y)
}
}
Edit: This was a well known long time issue when not using usePlatformDefaultWidth = false
so we were forced to workaround with that.
Now even with it it trigger that. (Depending on the phone, it's either super slow, or laggy and jumping).
ro...@gmail.com <ro...@gmail.com> #5
I am seeing a problem with decorFitsSystemWindows = false
where it continues to invalidate the layout even after the animation completes. I don't think that's the problem you're worried about, though.
If I understand correctly, the problem you're seeing is something about it being laggy? And it didn't happen in the previous version, right?
That problem is likely due to the Window resizing on every frame, which is more expensive than the window content resizing on every frame. In a previous iteration, the window size was full screen and the content resized itself. You can resolve this yourself by doing this:
Surface(
modifier = Modifier.safeContentPadding()
.fillMaxSize()
.wrapContentHeight()
.fillMaxWidth(0.8f)
.animateContentSize(),
...
I'll see if I can fix the problem with decorFitsSystemWindows = false
invalidating layout continuously.
su...@google.com <su...@google.com> #6
There's 2 very different issue here. The main very blocking is the Samsung dialogs from a bottomsheet/popup being at the bottom and under the navigation bar. Samsung is a very large percent of users. And a full rewrite of all M3 AlerDialog to something else to workaround is a pain as most M3 things are private / internal.
The second issue is about the huge lag.
It was present since a very long time with usePlatformDefaultWidth = true
but not with usePlatformDefaultWidth = false
now it's always present.
AFAIR previously all the workaround based on .fillMaxSize()
had issues with the dialog scrim, but I'll try again if there's a fix for the Samsung devices.
su...@google.com <su...@google.com> #7
I just verified that an AlertDialog
called from a ModalBottomSheet
from a Pixel 9XL works fine. I'll see if I can find a Samsung device to test.
ch...@instacart.com <ch...@instacart.com> #8
Yes this is specific to Samsung as stated in first message.
I repro via Samsung testlab as I do not have a device myself, but A54 A55 with Android 14 there does reproduce the issue. (And a few different other Android 14 samsung devices from my beta users)
Description
Version used: 1.0.0-alpha12
After upgrading to alpha12, all of my Workers written in Kotlin (and CoroutineWorkers, FWIW), complain about the 'Result' return value with an error that says: "One type argument expected for class Result<out T>"
It appears that the Kotlin standard library contains a public inline Result class already:
The Kotlin Result class is automatically available in every file, so Android Studio (3.2.1) doesn't offer to import the androidx.work.Result class, causing the error since it assumes you want to use the already available kotlin Result.
There were two workarounds, neither very friendly:
1) Use the fully qualified androidx.work.Result
2) Manually adding the androidx.work.Result import statement
Note that:
- Using the fully qualified name, then using the Android Studio option to add import did not work
- Removing the doWork method entirely and using Android Studio's quick fix to implement the method did add an import to androidx.work.Result, so new classes would avoid running into this issue.