https://kotlinlang.org logo
n

nitrog42

10/04/2021, 1:47 PM
awesome finding -> you can force the locale for graphic/unit test using :
Copy code
composeTestRule.setContent {
    CompositionLocalProvider(LocalContext provides LocalContext.current.createConfigurationContext(Configuration().apply {
        setLocales(LocaleList(Locale.ENGLISH))
    })) {
        //YourUi
    }
}
It avoids having a custom activity or relying on some weird resources modifications
android dance 1