Пример #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));
 }