title: How to programmatically change the primary color in Android L?
body: <p>Is there a way to change programmatically the primary colors. I would like to do it in code depending on the screen/state of the app.</p>
  
  <p>Currently I can only set the colors in the theme (static) :</p>
  
  <pre><code>&lt;item name="android:colorPrimary"&gt;@color/primary_color&lt;/item&gt;
  &lt;item name="android:colorPrimaryDark"&gt;@color/dark_color&lt;/item&gt;
  &lt;item name="android:colorBackground"&gt;@android:color/white&lt;/item&gt;
  &lt;item name="android:colorAccent"&gt;@color/primary_color&lt;/item&gt;
  &lt;item name="android:colorControlHighlight"&gt;@color/primary_color&lt;/item&gt;
  </code></pre>