Working on RTL support for compose, and everywhere...
# compose
s
Working on RTL support for compose, and everywhere it is recommended to use
Copy code
CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl){
}
I only want this to happen when the locale is RTL, is there any efficient way to find out what layout direction should be used?
c
I do not think you should provide this at all. It is already provided by compose. You can just read the value
LocalLayoutDirection.current
and make decision based on that. You only have to provide this if you want to force your layout to be another direction than the system’s.
s
But the behaviour is very different, if i dont provide this i dont get fully RTL screen, some views automatically gets shifted but not all. But with this, every single view is mirrored.
152 Views