このコードを目的の c に再作成する方法はありますか? 始めたばかりで、助けが必要です。
String name = #;// Will often vary.
SharedPreferences userData = this.getSharedPreferences(name + "userdata", MODE_PRIVATE);
Editor edit = userData.edit();
edit.clear();
edit.putFloat("rating", Rating.getRating());
edit.putString("good", txtGood.getText().toString().trim());
edit.putString("improve", txtImprove.getText().toString().trim());
edit.commit();
Log.d(TAG, "Saving Data");
The advantage of this code is that is makes a new SharedPreference everytime the method is called. With my experience using NSUserDefaults, it was only able to make 1 batch of data.