event handler for holding a list item

by kingkung » Mon, 12 May 2008 22:10:32 GMT


Sponsored Links
 There is the onListItemClick() function for handling item clicks in a
list activity.

How do you handle events which should occur when a person presses and
holds down a list item for >2 secs or so?  There must be a way to
handle these events, since the Contacts application does so (holding
down something in a list will bring up a popup menu of choices).

Anyone have any idea?  Thanks.
--~--~---------~--~----~------------~-------~--~----~



event handler for holding a list item

by Mark Murphy » Mon, 12 May 2008 22:16:59 GMT


 > How do you handle events which should occur when a person presses and

That would be AdapterView#setOnItemLongClickListener().

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
The Busy Coder's Guide to Android Development -- coming in June 2008!


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


event handler for holding a list item

by kingkung » Tue, 13 May 2008 18:29:02 GMT


 Thanks!



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Submission evaluation

Is any body can tell , whether the evaluation has been started or not?
i know many of you have submmited application which will interect with
web and if tested then you will be able to understand that the testing
of the software is started , can any body provide information that
evaluation has started??
--~--~---------~--~----~------------~-------~--~----~

2. Android Email Team - Email Message Flags and Imap Idle

could these "Flags" be tags on the client side ?
do they need to be synced to the server? what is
their server-side data struct ? categories in exchange ?
maybe openintents can handle some of this.
email stack is still on my do list





--~--~---------~--~----~------------~-------~--~----~

3. Hardware considerations for application with media

4. get key pressed actively

5. About error:Argument must not be null

6. About camera in android

7. question about adding external source folders to your project