title: Change default Locale language android
body: <p>I have made 2 different strings.xml, 1 for swedish and 1 for english. </p>
  
  <p><strong>Code for changing Locale</strong></p>
  
  <pre><code> public void setLocale(String lang) {
      Locale myLocale = new Locale(lang);
      Resources res = getResources();
      DisplayMetrics dm = res.getDisplayMetrics();
      Configuration conf = res.getConfiguration();
      conf.locale = myLocale;
      res.updateConfiguration(conf, dm);
      Intent refresh = new Intent(getContext(), BaseActivity.class);
      startActivity(refresh);
  }
  </code></pre>
  
  <p><strong>Onclicklisteners for switching language</strong></p>
  
  <pre><code>swedish.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              setLocale("sv");
          }
      });
      english.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              setLocale("en");
          }
      });
  </code></pre>
  
  <p>The thing is, the app took it by itself to start the app on swedish, which, as far as I know, haven't set by myself. How do I change the default Locale when the app starts?</p>
  
  <p><strong>Question</strong></p>
  
  <ol>
  <li>How do I set the app to start with using the english xml?</li>
  <li>Does anyone have a tip on how to store the choice the user makes? I want it to store if the user presses to use swedish if it closes the app.</li>
  </ol>