/*
     * (non-Javadoc)
     *
     * @see
     * android.widget.AdapterView.OnItemClickListener#onItemClick(android
     * .widget.AdapterView, android.view.View, int, long)
     */
    @Override
    public void onItemClick(android.widget.AdapterView<?> arg0, View v, int position, long arg3) {

      DialogMenuItem menuItem = (DialogMenuItem) arg0.getItemAtPosition(position);

      switch (menuItem.getMenuDialogAction()) {
        case 0:
          performWatchedToggle();
          break;
        case 1:
          startDownload();
          break;
        case 2:
          performAddToQueue();
          break;
        case 3:
          performPlayTrailer();
          break;
        case 4:
          performGoogleTVSecondScreen();
      }
      v.requestFocusFromTouch();
      dialog.dismiss();
    }
 protected DialogMenuItem createMenuItem(String title, int action) {
   DialogMenuItem menuItem = new DialogMenuItem();
   menuItem.setTitle(title);
   menuItem.setMenuDialogAction(action);
   return menuItem;
 }