Activating items in a list

This document describes the code changes required to activate items in a list on single-tap.

Replace the EEventItemDoubleClicked event with EEventItemSingleClicked. Remove the EEventItemClicked processing code if any.

The following code snippet illustrates the changes to the event handling code of a File Browser application.

// ----------------------------------------------------------------------------
// CFileBrowseBaseView::HandleListBoxEventL
//
// If single-tap is enabled, the touch related events must be handled here
// ----------------------------------------------------------------------------
//
void CFileBrowseBaseView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
 {
  if(AknLayoutUtils::PenEnabled())
  {
    switch (aEventType)
    {
		  //case EEventItemDoubleClicked: ----- Remove this code--------------
      case EEventItemSingleClicked: //------- Include this new event for item activation---
      {
        NavigateL(iListBox->CurrentItemIndex()); // user defined function for navigating to the selected folder
	     OpenFolderL(); // user defined function for opening the selected folder
	     break;
      }
    }
  }
}