scsjc Well-Known Member Licensed User Longtime User Aug 11, 2018 #1 Hi, i need load the theme when start app, i see to launch theme in manifest : Code: SetApplicationAttribute(android:theme, "@style/clasictheme") is possible launch diferent theme depend of variable from program ?? i test to launch with: Code: #if java public void _onCreate() { if (_theme_value != 0) setTheme(_theme_value); } but... _onCreate() start before Activity_create
Hi, i need load the theme when start app, i see to launch theme in manifest : Code: SetApplicationAttribute(android:theme, "@style/clasictheme") is possible launch diferent theme depend of variable from program ?? i test to launch with: Code: #if java public void _onCreate() { if (_theme_value != 0) setTheme(_theme_value); } but... _onCreate() start before Activity_create
DonManfred Expert Licensed User Longtime User Aug 11, 2018 #2 https://www.b4x.com/android/forum/threads/changing-the-theme-at-runtime.57277/#content Upvote 0
scsjc Well-Known Member Licensed User Longtime User Aug 11, 2018 #3 DonManfred said: https://www.b4x.com/android/forum/threads/changing-the-theme-at-runtime.57277/#content Click to expand... Yes I use and work... But the effect is not nice. .. reload app ( first time with manifest theme and reload with changed theme ) Can load the app first time with a select theme? Upvote 0
DonManfred said: https://www.b4x.com/android/forum/threads/changing-the-theme-at-runtime.57277/#content Click to expand... Yes I use and work... But the effect is not nice. .. reload app ( first time with manifest theme and reload with changed theme ) Can load the app first time with a select theme?
DonManfred Expert Licensed User Longtime User Aug 11, 2018 #4 The app is loaded with the Manifesttheme first. No. Upvote 0
ivan.tellez Active Member Licensed User Longtime User Aug 11, 2018 #5 scsjc said: But the effect is not nice. .. reload app ( first time with manifest theme and reload with changed theme ) Click to expand... Main could be an empty activity just with code to change theme and calling the reall Activity after the reload. Also you can change the transitions to avoid the reloading feeling Last edited: Aug 12, 2018 Upvote 0
scsjc said: But the effect is not nice. .. reload app ( first time with manifest theme and reload with changed theme ) Click to expand... Main could be an empty activity just with code to change theme and calling the reall Activity after the reload. Also you can change the transitions to avoid the reloading feeling
scsjc Well-Known Member Licensed User Longtime User Aug 12, 2018 #6 ivan.tellez said: Main could be an empty activity just with code to change theme and calling the reall Activity afthere the reload. Also you can change the transitions to avoid the reloading feeling Click to expand... Yes this idea is good... and i testing a simple solution Upvote 0
ivan.tellez said: Main could be an empty activity just with code to change theme and calling the reall Activity afthere the reload. Also you can change the transitions to avoid the reloading feeling Click to expand... Yes this idea is good... and i testing a simple solution
scsjc Well-Known Member Licensed User Longtime User Aug 12, 2018 #7 Hi, i attach a simple code, the idea is when start first time app, main are in transparent... change the theme and reload the main... All process soft transtitions.... Attachments change_theme.zip change_theme.zip 22.6 KB · Views: 498 Upvote 0
Hi, i attach a simple code, the idea is when start first time app, main are in transparent... change the theme and reload the main... All process soft transtitions....