title: How to set font scale in my own android application?
body: <p>I want to allow user select font size.  </p>
  
  <p>Spare Parts do provide the feature to do that, </p>
  
  <blockquote>
    <p>ActivityManagerNative.getDefault().updateConfiguration(new font size scale config)</p>
  </blockquote>
  
  <p>but that is for whole all android applications. I want to add it in my application's preference and only impact for my app. </p>
  
  <p>I tried below methods, it do works sometimes, but the first time I start my application, the font size still with the 1.0 scale. I do not why. I added below code in every onCreate of my activities.</p>
  
  <blockquote>
    <p>Configuration config = resources.getConfiguration(); config.fontScale=1.5f;
    resources.updateConfiguration(config, mDisplayMetrics);</p>
  </blockquote>
  
  <p>What can I do?</p>