I\'m developing a themes chooser feature in my \"app manager\" app, and I\'ve succeeded setting the theme dynamically for each of the activities.
<
To fix any flickering (action bar, title...) upon app's start, I have set into the manifest
android:theme="@android:style/Theme.NoTitleBar"
for both my main activities (a tab container and a settings activity, from where I switch the themes, based on holo dark and light)
If you use some "launcher activity" or "splash activity" apply Theme.NoTitleBar
also for them, then:
having declared Theme.NoTitleBar
, for each activity, in onCreate
you have to:
set the title properly with setTitle(...)
and THEN
set the theme with setTheme(R.style.CustomAppTheme)
BEFORE setContentView(...)
(and you already do this);
This will prevent the flashing of the action bar/title when switching theme (if done "on-the-fly") and upon app's start.
If you want a custom action bar appearance, this means that the default holo action bar will not flash before yours.