示例#1
0
 private static Locale getLocaleFromPref(Context context) {
   PreferenceService ps = PreferenceService.from(context);
   String country = ps.getVal(R.string.key_pref_currency, DEFAULT_COUNTRY);
   Locale locale = new Locale(Locale.getDefault().getLanguage(), country);
   // Log.d(TAG, lang + " " + country);
   return locale;
 }
示例#2
0
 private static String getDateFormatFromPref(Context context) {
   PreferenceService ps = PreferenceService.from(context);
   return ps.getVal(R.string.key_pref_date_format, DATE_FORMAT);
 }
示例#3
0
 public static String getJournalFromPref(Context context) {
   PreferenceService ps = PreferenceService.from(context);
   return ps.getVal(R.string.key_pref_journal_choice, context.getString(R.string.str_journal));
 }
示例#4
0
 public static String getPartyFromPref(Context context) {
   PreferenceService ps = PreferenceService.from(context);
   return ps.getVal(R.string.key_pref_party_choice, context.getString(R.string.str_party));
 }
示例#5
0
 public static String getCrFromPref(Context context) {
   PreferenceService ps = PreferenceService.from(context);
   return ps.getVal(R.string.key_pref_cr_choice, context.getString(R.string.str_given_by));
 }