android持久化数据的一种方式是使用SharedPreferences来进行:
1、读取数据
SharedPreferences mPerferences = PreferenceManager.getDefaultSharedPreferences(activity.this);
int zheshisha = mPerferences.getInt("zheshisha", 1000);
// use zheshisha
2、保存数据
SharedPreferences.Editor mEditor = mPerferences.edit();
mEditor.putInt("zheshisha", totalMoney);
mEditor.commit();