Home > database >  Android Jetpack Compose Language Switching via AppCompatDelegate is not working
Android Jetpack Compose Language Switching via AppCompatDelegate is not working

Time:11-13

I am trying to build an in-app language switcher for the app I am working on, but I have tried almost everything method available on Stackoverflow. I also tried Official guide from here enter image description here

  • Another thing,In Your case go to Settings Screen DropDown menu, Once select any language you have to store that code not name enter image description here . . .

  • More Info : if we use AppCompatDelegate.setApplicationLocales() with MaterialTheme, Context is becomes NULL, so its not able to create Locale Manager.

    enter image description here

    the Context is null because of sActivityDelegates is empty.

    Even I don't know what is sActivityDelegates enter image description here

    But, as soon as i change the Theme to AppCompat. its becomes working.

    Tell us, if someone know about sActivityDelegates, and why its not adding when lifecycle in postCreate as they mention in Comments. it would be appreciated.

    • Related