的另一個活動中使用SharedPreferrence值我在Shared Preference中存儲一個值,並且它已成功存儲。 下面是一段我的代碼如何在我的應用程序中的Android應用
SharedPreferences prefs = getSharedPreferences("idValue", 0);
Editor editor = prefs.edit();
editor.putString("idValue", chap.getid());
editor.commit();
Log.e("Shared Pref",""+chap.getid());
現在我想用在其他一些活動,這個值與條件是否爲空或有一個值。
如何獲得另一個動作這個值.....
一個很好的答案:)) – 2013-04-16 07:47:01