title: Android: how to handle day/night themes
body: <p>I'm building an Android app and I need to have two different themes for day and night modes: different colors and different drawables.</p>
  
  <p>What is the best way to do it?</p>
  
  <p>I've noticed a service called UiModeManager but I'm not sure if it behaves like I expect. I've placed two different bitmaps (with the same name) in drawable-mdpi and drawable-night-mdpi and I created an Activity that shows that bitmap.</p>
  
  <p>I've tried to switch the day/night mode by putting in the onCreate():</p>
  
  <pre><code>    UiModeManager uiManager = (UiModeManager) getSystemService(Context.UI_MODE_SERVICE);
      uiManager.setNightMode(UiModeManager.MODE_NIGHT_YES);
  </code></pre>
  
  <p>But Android always shows the "day" version.</p>
  
  <p>Any suggestion or hint would be appreciated.</p>
  
  <p>Thanks,
  Maurizio</p>