示例#1
0
 public static int getSortBy() {
   SharedPreferences sharedPreferences =
       PreferenceManager.getDefaultSharedPreferences(NoteApplication.getContext());
   return sharedPreferences.getInt(BirdMessage.SORT_BY, BirdMessage.SORT_BY_DEFAULT);
 }
示例#2
0
 public static void setSortBy(int value) {
   SharedPreferences sharedPreferences =
       PreferenceManager.getDefaultSharedPreferences(NoteApplication.getContext());
   sharedPreferences.edit().putInt(BirdMessage.SORT_BY, value).commit();
 }