Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com> #2
@ezio1497@gmail.com Could you please insert the code snippet that you've used?
Meanwhile I tried a few examples. If we change the layout direction by changing the locale (or setting the developer option "Force RTL layout direction"), it works. But if instead we set the layout direction via the ambient (Providers (LayoutDirectionAmbient provides LayoutDirection.Rtl) { Popup() }
), then the layout direction won't be propagated to the content of the Popup
If I understand correctly, the value of the layout direction set via ambient should have been propagated. So it seems like there is an issue with the ambient. Below is the minimum repro:
- Define a new ambient
val MyAmbient = ambientOf<Int>()
- Use it for Popup content size
Providers(MyAmbient provides 200) {
Popup(alignment = Alignment.CenterStart) {
val sizeDp = with(DensityAmbient.current) { MyAmbient.current.toDp() }
Box(Modifier.preferredSize(sizeDp).background(Color.Gray))
}
}
-
Run example and notice the result - Popup size is 200
-
Set the value of MyAmbient in ProvideCommonAmbients to 10
internal fun ProvideCommonAmbients(...) {
Providers(
...,
MyAmbient provides 10,
children = content
)
}
- Rerun using the same code snippet from step 2 and notice that the Popup size becomes 10. So even though we provided 200 on step 2, the content of the Popup still uses the one set on step 4.
Chuck, could you please take a look?
Description
Version used: 1.0.0-alpha01
When you use a nested graph as the startDestination for your whole graph, NavigationUI does not highlight the correct row in the NavigationView or the correct item in BottomNavigationView. It also changes the up button to be an arrow, even when you are on the (nested) start destination of the graph.