Status Update
Comments
il...@google.com <il...@google.com> #2
Use cases: Some phone(like OnePlus) will change the density when rotating the screen or enter PIP mode, I use slider to make a controller for a video player app, at this point the video is playing and the progress bar is changing, then App will be crashed
[Deleted User] <[Deleted User]> #3
Not sure I understand the use case.
Slider cannot measure 0.dp it has to measure at least 2 thumbs so that the thumb can move from 0f to 1f. Do you mean to use Modifier.weight instead so that it takes the available space?
ap...@google.com <ap...@google.com> #4
yes, i am using Modifier.weight for Slider, i don't know why it crash on OnePlus phone
il...@google.com <il...@google.com> #5
Here is a example code of my slider controller
Row(Modifier.fillMaxWidth()) {
// Some icon buttons here
Slider(
modifier = Modifier.weight(1f)
//...
}
// Other icon buttons here
}
When exiting the horizontal screen state or entering the picture-in-picture mode, the above exception will be caused, and it only happens on OnePlus phone
ap...@google.com <ap...@google.com> #6
Thanks I'll add a fix for parents with width 0.dp maybe it something that only happens briefly and then it measures something reasonable. Can you share the exact model/OS?
Description
Component used: Navigation
Version used: 2.2.0, 2.3.0, 2.3.1
Devices/Android versions reproduced on: 10.0, 9.0 - probably not related
Description:
I've updated two dependencies in my project:
and now I see that
NavController::navigate
needs to be called from the main thread. OtherwiseNavBackStackEntry
throwsIllegalStateException
when trying to register lifecycle observer.Stacktrace:
There were no changes in documentation so I assume that this behavior is unintended.