|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE task |
|
11 PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
|
12 <task id="GUID-361BB951-DB74-4D83-ACFC-812383C8129C" xml:lang="en"><title>Activating |
|
13 items in a list</title><shortdesc>This document describes the code changes required to activate items |
|
14 in a list on single-tap.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
15 <steps-unordered id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-4-1-1-7-1-4-1-7-1-3-1"> |
|
16 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-4-1-1-7-1-4-1-7-1-3-1-1"><cmd>Replace the <codeph>EEventItemDoubleClicked</codeph> event |
|
17 with <codeph>EEventItemSingleClicked</codeph>. Remove the <codeph>EEventItemClicked</codeph> processing |
|
18 code if any.</cmd> |
|
19 <stepxmp><p>The following code snippet illustrates the changes to the event |
|
20 handling code of a File Browser application.</p><codeblock xml:space="preserve">// ---------------------------------------------------------------------------- |
|
21 // CFileBrowseBaseView::HandleListBoxEventL |
|
22 // |
|
23 // If single-tap is enabled, the touch related events must be handled here |
|
24 // ---------------------------------------------------------------------------- |
|
25 // |
|
26 void CFileBrowseBaseView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType) |
|
27 { |
|
28 if(AknLayoutUtils::PenEnabled()) |
|
29 { |
|
30 switch (aEventType) |
|
31 { |
|
32 <b> //case EEventItemDoubleClicked:</b> ----- Remove this code-------------- |
|
33 <b>case EEventItemSingleClicked:</b> //------- Include this new event for item activation--- |
|
34 { |
|
35 NavigateL(iListBox->CurrentItemIndex()); // user defined function for navigating to the selected folder |
|
36 OpenFolderL(); // user defined function for opening the selected folder |
|
37 break; |
|
38 } |
|
39 } |
|
40 } |
|
41 } |
|
42 </codeblock></stepxmp> |
|
43 </step> |
|
44 </steps-unordered> |
|
45 </taskbody></task> |