0
ted
을 저장할 단축 프로그램을 으로 작성한 다음 에 값을로드하려고합니다. getString
을 사용하여 값을로드하면 boardstr
값이 변경되지 않습니다.환경 설정을 사용하여 데이터를 저장하려고하는 Android
boardstr= new String();
boardstr="fred";
// set the prefrence to ted
this.getPreferences(MODE_PRIVATE).edit().putString("board","ted");
// kload the prfrence in boardstr
this.getPreferences(MODE_PRIVATE).getString("board",boardstr);
// boardstr stil equals fred, not ted
가 속임수를 썼는지 그, 감사합니다! –