title: setTheme works but only after loading theme from manifest
body: <p>I'm trying to set the theme of my Activity during runtime, choosing one of a number of themes.  I want the chosen theme to display immediately on startup of the Activity.</p>
  
  <p>In the <code>&lt;application&gt;</code> part of my manifest I have set a default theme with <code>android:theme="@style/AppTheme"</code>.  And then in my <code>onCreate()</code> I use <code>setTheme(R.style.DarkAppTheme)</code> to set the theme to a user-selected theme (replacing <code>DarkAppTheme</code> with the selected theme).</p>
  
  <p>And based on research it seems that <code>setTheme()</code> should go before <code>onCreate()</code> and before <code>setContentView()</code>, which I do.</p>
  
  <p>BUT although this works to display the Activity in the user selected theme, the Activity first loads with what looks like the default theme, and then after a short delay the correct theme loads.</p>
  
  <p>If I set the user selected theme directly in the manifest, that loads immediately as I want, but of course that is hardcoded and I want to change this dynamically based on a shared preference.</p>
  
  <p>How do I avoid the visible changeover?  I want the user selected theme to be displayed right from the start.</p>
  
  <p>Thanks.</p>