Remember me checkbox dont save the username and pass when open the app again
<p>remembered password means if i enter the username and password then enabled the remember password checkbox means it is successfully login.then i clicked logout means it is loggedout.
but again i open  app  the username and password is displayed on d edittext know...
but when i loggedout on my  app is loggedout afterthat again i open d app means the username and password are not saved.
here's my code :</p>

<pre><code>        myPrefs = this.getSharedPreferences("myPrefs",MODE_PRIVATE);
        user=myPrefs.getString(PREF_USERNAME, "username");
        pass=myPrefs.getString(PREF_PASSWORD, "password");
        checked=myPrefs.getString(PREF_CHECKED, "TRUE");

        SharedPreferences sp1=this.getSharedPreferences(PREFS_NAME,MODE_PRIVATE);
         userName=sp1.getString(PREFS_NAME , null);       
        password = sp1.getString(PREF_PASSWORD, null);



loginButton.setOnClickListener(new OnClickListener() {
            public void onClick(View view) {

InputMethodManager imm =(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
                imm.hideSoftInputFromWindow(passwordEditText.getWindowToken(),
                        0);
                Data.LANGUAGE = "1";
                String username = ar_EditText.getText().toString().trim();
               String password = passwordEditText.getText().toString().trim();
               if(CBox.isChecked()){
                  getSharedPreferences(PREFS_NAME,MODE_PRIVATE).edit().putString(PREF_USERNAME,userName).putString(PREF_PASSWORD,password).putString(PREF_CHECKED,"TRUE")
                .commit();
               }else
               {
                   getSharedPreferences(PREFS_NAME,MODE_PRIVATE).edit().clear().commit();
               }
</code></pre>
