title: how to modify a string value in my String.xml file using editor.putString (sharedpreference)?
body: <p>Here is my code:</p>
  
  <pre><code>SharedPreferences prefs= PreferenceManager.getDefaultSharedPreferences(getBaseContext());
  Editor ed=prefs.edit();
  ed.putString(getString(R.string.firsttemplate), "String Modified");
  ed.apply();
  ed.commit();
  Toast.makeText(getBaseContext(), getString(R.string.firsttemplate), Toast.LENGTH_SHORT).show();
  </code></pre>
  
  <p>this Toast is showing the previous text saved in my string value</p>
  
  <p>I also saw already asked questions about SharedPreferences but it wasn't helpful. </p>