1
I have migrated my splash screen to Android splash screen to support android 12. App uses user theme based on color. The theme was set onCreate() method of activity with setTheme() method.

After migration, I can set only one theme through XML attribute "postSplashScreenTheme". How to set "postSplashScreenTheme" programmatically.

  • https://stackoverflow.com/a/11576546/19491703 try this link – Beant Singh Jul 15 '22 at 04:31
  • try [```Activity.getSplashScreen().setSplashScreenTheme(int themeId)```](https://developer.android.com/reference/android/window/SplashScreen#setSplashScreenTheme(int)) – Ayaka_Ago Jul 15 '22 at 06:46
  • @BeantSingh I am using setTheme() to change theme. That is working ok for upto Android 11. but after migrating to Android Splash Screen for Android 12 Compatibility only option available for theme after splash is to specify "postSplashScreenTheme" from XML. – Mohammed Yaseen Jul 16 '22 at 08:38
  • @Ayaka_Ago I need to set app main theme programmatically not the Splash Screen theme. – Mohammed Yaseen Jul 16 '22 at 08:39

0 Answers0