Long Press ListView item to open AlertDialog

by Abhi » Fri, 11 Dec 2009 03:35:48 GMT


Sponsored Links
 Hi,

I am trying to use the long press option on the listview items to open
a multi choice Alert Dialog. Is this possible?

Abhishek

--



Long Press ListView item to open AlertDialog

by Jason Proctor » Fri, 11 Dec 2009 03:40:15 GMT


 yes.



>


Sponsored Links


Long Press ListView item to open AlertDialog

by Abhi » Fri, 11 Dec 2009 03:49:28 GMT


 would you be able to guide me to the right tutorial? I am unable to
find it

Thanks,

Abhi

On Dec 10, 2:39pm, Jason Proctor <jason.android.li...@gmail.com>


> >



Long Press ListView item to open AlertDialog

by Jason Proctor » Fri, 11 Dec 2009 03:54:24 GMT


 check Activity.registerForContextMenu()

and Activity.onCreateContextMenu()

works for me.


>>  >



Long Press ListView item to open AlertDialog

by Abhi » Fri, 11 Dec 2009 04:04:09 GMT


 Jason,

Thanks. But this is for opening a context menu on long press. I am
trying to open the alert dialog instead.

Abhishek

On Dec 10, 2:53pm, Jason Proctor <jason.android.li...@gmail.com>



> >> >



Long Press ListView item to open AlertDialog

by Jason Proctor » Fri, 11 Dec 2009 04:08:28 GMT


 oh sorry i misread your post.

have you played with overriding View.setLongClickable() and 
View.setOnLongClickListener() ?

opening a dialog when the latter goes off should work.





>>  >>  >



Other Threads

1. Android Sensors

Where can I find information on linux sensor integration and how do
the sensor integrate into the android framework ? Greatly appreciate
your help.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Broadcast between desktop and simulator application in WIFI

Hello everyone,

I have two peer-to-peer apps, one runs in the desktop and one runs in
the Android Simulator (1.6 version). Each program broadcast the
message (by UDP with port 44446) to its network to discovery the
remote service of the other.

In desktop: application has IP 192.168.1.13, broadcast, and received
broadcast message in port A

In simulator: however, the application has IP: 10.0.2.15, broadcast,
and received the broadcast message in port B

I have applied "redir" port forwarding: redir add udp:4446:[port-B-in-
simulator]. But it doesn't show any result.

p/s: I have tested two apps in in different consoles in desktop and it
works to discover each other.

Thanks a lot for your help


Anh

-- 

3. SGX driver impact Android phone

4. connect to PC

5. gallery problem

6. Selectively start a service based on type of build

7. threaded email