private void sortDate() {
   if (sort == 5) {
     oldPref.setPreferences("displaySort", 4);
   } else {
     oldPref.setPreferences("displaySort", 5);
   }
   sort = (int) oldPref.getPreferences("displaySort");
   generateAdapterView(tempItemList, sort);
 }
 private void sortDuration() {
   if (sort == 3) {
     oldPref.setPreferences("displaySort", 2);
   } else {
     oldPref.setPreferences("displaySort", 3);
   }
   sort = (int) oldPref.getPreferences("displaySort");
   generateAdapterView(tempItemList, sort);
 }