android edit sharedpreferences existing variable called zipcode
<p>I have my code:</p>

<pre><code>final EditText input2 = new EditText(mActivity);


            AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
                    builder.setTitle("User Info Request:");
                    builder.setMessage("Enter Zip Code:");

                    final EditText input2 = new EditText(mActivity);

                   builder.setView(input2);

                   SharedPreferences.Editor editor = prefs.edit();
                   editor.putString("zipcode","input2");
                   editor.commit();


}
</code></pre>

<p>How can i take that string/text the user entered and replace my shared preferences value 'zipcode' with the value Input2 ? The way i try now it sets the "zipcode" shared pref to "input2" but i need the result of user input to change the existing value in shared prefs... =/</p>

<p>I have made several attempts at this with no luck, and help would be great.</p>

<p>Droidster</p>
