protected void initCheckedState() {
   setChecked(
       Application.getPrefs()
           .getBoolean(
               getContext().getString(R.string.preference_key_experimental_regions),
               DEFAULT_VALUE));
 }
 /**
  * Returns the currently selected stop sort order as the index in R.array.sort_stops
  *
  * @return the currently selected stop sort order as the index in R.array.sort_stops
  */
 public static int getStopSortOrderFromPreferences() {
   Resources r = Application.get().getResources();
   SharedPreferences settings = Application.getPrefs();
   String[] sortOptions = r.getStringArray(R.array.sort_stops);
   String sortPref =
       settings.getString(r.getString(R.string.preference_key_default_stop_sort), sortOptions[0]);
   if (sortPref.equalsIgnoreCase(sortOptions[0])) {
     return 0;
   } else if (sortPref.equalsIgnoreCase(sortOptions[1])) {
     return 1;
   }
   return 0; // Default to the first option
 }
 public static void saveBoolean(String key, boolean value) {
   saveBoolean(Application.getPrefs(), key, value);
 }
 public static void saveLong(String key, long value) {
   saveLong(Application.getPrefs(), key, value);
 }
 public static void saveInt(String key, int value) {
   saveInt(Application.getPrefs(), key, value);
 }