是否可以附加我存储的数据SharedPreferences
而不是覆盖每个条目?
public void onClick(View argument) {
// TODO Auto-generated method stub
if(argument==save)
{
SharedPreferences sp=getSharedPreferences("userInfo", 0);
SharedPreferences.Editor spe=sp.edit();
spe.putInt("ID",Integer.parseInt(enteredID.getText().toString()));
spe.putString("name", enteredName.getText().toString());
spe.putString("password",enteredPassWord.getText().toString());
spe.putInt("age", Integer.parseInt(enteredAge.getText().toString()));
spe.commit();
}
}