how to append data in Shared Preference in Android
<p>I tried to append the data in shared preference file by using</p>

<pre><code>SharedPreferences sharedPreferences = getSharedPreferences("myData", MODE_APPEND);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putString("name", userName.getText().toString());
editor.putString("password", password.getText().toString());
editor.commit();
</code></pre>

<p>But I found that new value overwrites the old value. Will you help me to fix this issue?</p>