@Override
 public boolean onOptionsItemSelected(MenuItem item) {
   int itemId = item.getItemId();
   if (itemId == R.id.menu_action_lists_add) {
     AddListDialogFragment.showAddListDialog(getSupportFragmentManager());
     Utils.trackAction(this, TAG, "Add list");
     return true;
   }
   if (itemId == R.id.menu_action_lists_search) {
     startActivity(new Intent(this, SearchActivity.class));
     return true;
   }
   if (itemId == R.id.menu_action_lists_edit) {
     int selectedListIndex = mPager.getCurrentItem();
     showListManageDialog(selectedListIndex);
     return true;
   }
   if (itemId == R.id.menu_action_lists_sort_title) {
     if (ListsDistillationSettings.getSortOrderId(this) == ListsSortOrder.TITLE_ALPHABETICAL_ID) {
       changeSortOrder(ListsSortOrder.TITLE_REVERSE_ALHPABETICAL_ID);
     } else {
       changeSortOrder(ListsSortOrder.TITLE_ALPHABETICAL_ID);
     }
     return true;
   }
   if (itemId == R.id.menu_action_lists_sort_episode) {
     if (ListsDistillationSettings.getSortOrderId(this)
         == ListsSortOrder.NEWEST_EPISODE_FIRST_ID) {
       changeSortOrder(ListsSortOrder.OLDEST_EPISODE_FIRST_ID);
     } else {
       changeSortOrder(ListsSortOrder.NEWEST_EPISODE_FIRST_ID);
     }
     return true;
   }
   if (itemId == R.id.menu_action_lists_sort_ignore_articles) {
     toggleSortIgnoreArticles();
     return true;
   }
   if (itemId == R.id.menu_action_lists_reorder) {
     ListsReorderDialogFragment.show(getSupportFragmentManager());
     return true;
   }
   return super.onOptionsItemSelected(item);
 }
示例#2
0
 private void fireTrackerEventAction(String label) {
   Utils.trackAction(getActivity(), TAG, label);
 }
示例#3
0
 @Override
 protected void fireTrackerEvent(String label) {
   Utils.trackAction(this, TAG, label);
 }