0
EditText hi = (EditText) findViewById(R.id.editText1);
String hi2 = hi.toString();
editor.putString("user_email", hi2);
editor.commit();
上面的代碼在我上點擊作品和編譯罰款,但是當我進入我的設置我得到的值是通的EditText爲字符串
[email protected]
有誰知道正確的語法,對我來說,將用戶輸入框中的值傳遞給我的前綴。
如果我使用
editor.putString("user_email","[email protected]");
那麼它的作品,因爲它是一個完整的字符串。