https://kotlinlang.org logo
#compose
Title
# compose
n

Napa Ram

08/09/2021, 12:40 PM
HI Everyone, is there any reference how to support Arabic and English in compose
a

Abdalla Hassanin

08/09/2021, 12:44 PM
override fun onCreate(savedInstanceState: Bundle?) { window.decorView.layoutDirection = View.LAYOUT_DIRECTION_RTL super.onCreate(savedInstanceState) setContent { AppMain() }}
👎🏼 1
this for arabic app only
l

louiscad

08/09/2021, 12:46 PM
It's the same as in regular Android apps, just support RTL (right to left), and translate string resources.
👍 2
You should not have to hack the layoutDirection as suggested in the snippet above.
a

Abdalla Hassanin

08/09/2021, 12:48 PM
@louiscad do you have another way
l

louiscad

08/09/2021, 12:49 PM
Search "support RTL android" on Google, and look for official doc.