-------------------------------------------存数据
SharedPreferences pp=getSharedPreferences("gyf", Context.MODE_PRIVATE);
Editor editor=pp.edit();
editor.putInt("age", 23);
--------------------------------------------取数据
SharedPreferences sspp=getSharedPreferences("gyf", 0);
int age=sspp.getInt("age", 25);
tView.setText(String.valueOf(age));