title: Android: shared preferences gives unknown text
body: <p>So i need my app to save and remember the name that user enters in a search field.
  I use shared preferences to do that..
  But when i close the app and open again, instead of the saved name i get a text like this: 
   android.support.AppCompatEditText{1f4bcb VEFD..Cl .F...197,800-860,927 app:id/username}</p>
  
  <p>What am doing wrong?</p>
  
  <pre><code>  static SharedPreferences sharedPref;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_profile);
    namefield = (EditText) findViewById(R.id.username); //this is the user-input field
    Tname = (TextView) findViewById(R.id.NameLabel); //this label will be the username when user press the UPDATEbtn
    UPDATEbtn = (Button)findViewById(R.id.Update_btn);
  
    // Get from the SharedPreferences
      sharedPref = getApplicationContext().getSharedPreferences(PREFS_NAME, 0);
      String USERname = sharedPref.getString("name", String.valueOf(0));
      Tname.setText(USERname);
  }
  
  
  
  
  //this is the onClick method of my UPDATEbtn
  public void UpdateInfo(View view)
  {
  
  Tname.setText(namefield.getText());
  
      sharedPref = getApplicationContext().getSharedPreferences(PREFS_NAME, 0);
      SharedPreferences.Editor editor = sharedPref.edit();
      editor.putString("name", String.valueOf(namefield));
  
    // Apply the edits!
      editor.apply();
  
  
  }
  </code></pre>