title: Android context.getResources.updateConfiguration() deprecated
body: <p>Just recently context.getResources().<a href="https://developer.android.com/reference/android/content/res/Resources.html#updateConfiguration(android.content.res.Configuration,%20android.util.DisplayMetrics)">updateConfiguration()</a> has been deprecated in Android API 25 and it is advised to use context.<a href="https://developer.android.com/reference/android/content/Context.html#createConfigurationContext(android.content.res.Configuration)">createConfigurationContext()</a> instead.</p>
  
  <p>Does anyone know how <strong>createConfigurationContext</strong> can be used to override android system locale?</p>
  
  <p>before this would be done by:</p>
  
  <pre><code>Configuration config = getBaseContext().getResources().getConfiguration();
  config.setLocale(locale);
  context.getResources().updateConfiguration(config,
                                   context.getResources().getDisplayMetrics());
  </code></pre>