public boolean getPrefs()
{
prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
PREF1 = prefs.getBoolean("pref1_key",pref1_default);
PREF2 = prefs.getString("pref2_key","pref2_default");
}
use this method to get all preferences you need. Call this in the onResume() or onCreate() method. You needn't worry about UI or anything