Join Slack
I want to change layout directions how can I do that thanks
# compose
u
3bdoelnaggar
09/16/2020, 5:25 PM
I want to change layout directions how can I do that thanks
v
Vinay Gaba
09/16/2020, 8:37 PM
This is one way to force it -
https://github.com/airbnb/Showkase/blob/0db791b4b4d1d7317c10b67c8617a2c96b4c71cc/showkase/src/main/java/com/airbnb/android/showkase/ui/ShowkaseComponentDetailScreen.kt#L172
u
3bdoelnaggar
09/17/2020, 1:59 PM
I was hoping for something less complex but I will look into it thanks
3bdoelnaggar
09/17/2020, 2:12 PM
It worked thanks I am trying to figure out what the code dose
v
Vinay Gaba
09/17/2020, 4:00 PM
it just passes the direction as am ambient and all composables that are in the scope will get that direction. The way it ends up working is that the
Layout
composable uses this ambient.
Layout
is used by a lot of composables internally like
Text
etc. That’s why it works for you!
👍 1
3
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by