//存数据
spCount = context.getSharedPreferences("counter", Context.MODE_WORLD_READABLE);
editor= spCount.edit();
editor.putString("username", "alex");
editor.commit();
//取数据
spCount = getSharedPreferences("counter", Context.MODE_WORLD_READABLE);
String userName= spCount.getString("username", "");