Can't keep AlertDialog on screen when KeyEvent.KEYCODE_BACK is handled with 1.5 (??)

by Marco Nelissen » Fri, 29 May 2009 12:45:34 GMT


Sponsored Links
 It's not a bug. I'm guessing you were expecting AlertDialog.show() to block
until the user makes the choice, but that's not how it works.
It's easy to make this work though: simply don't call super.onKeyDown() when
the user pressed the back button. That will keep the system from ending your
activity. Then just call finish() when you do want to end the activity.







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



Can't keep AlertDialog on screen when KeyEvent.KEYCODE_BACK is handled with 1.5 (??)

by Rob Franz » Fri, 29 May 2009 12:50:35 GMT


 Thanks Marco.  Took out the super.onKeyDown and it does block... you're
right.
However, my complaint on the other thing - lack of setPositiveButton and
setNegativeButton - still stands :-)

If I do two calls to setButton, I only get the last button.  Were the above
two functions removed?

Thanks again.
Rob






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


Sponsored Links


Can't keep AlertDialog on screen when KeyEvent.KEYCODE_BACK is handled with 1.5 (??)

by Rob Franz » Fri, 29 May 2009 20:23:38 GMT


 YI, looks like setPositiveButton and setNegativeButton are gone, and now
you have setButton, setButton2, and setButton3.
On Fri, May 29, 2009 at 12:50 AM, Rob Franz <rob.fr...@gmail.com> wrote:


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



Other Threads

1. Salam Kenal :)

Halu selamat malam bapak2 ibu2 :) Salam kenal semuanya,
Dari tadi baru numpang memantau milis id-android aja, kayaknya ilmunya
langitan semua nih :) Mohon bimbingannya.

Saya baru kurang lebih sebulan pake Samsung Spica, belum diapa2in
kecuali rooting :p mudah2an seiring waktu baca2 disini, bisa sedikit
nular ilmu2nya.

Terima kasiiih.. ;)

-- 
Regards,
Dewi

-- 
"

2. How to flash Froyo on HTC HERO G2

I have urgent issue. Made some changes in Froyo Source Code in
Application/Framework area. Want to flash it to HTC HERO G2.

Taken the backup of HTC HERO. Created one backup folder which is
having 5 images.
(1)boot.img (2) cache.img (3) data.img (4)recovery.img (5)system.img
Note: I can take recovery from this easily.

I build FROYO and found 3 images. (1) system.img (2) ramdisk.img (3)
userdata.img.

I have not made any change in KERNEL or anywhere else. So I took only
system.img from FROYO recent build and replaced the system.img of the
HTC backup folder. Tried to take recovery but it is not happening.

Could you pls give me the solution. I'm completely stuck. Not getting
any relevant steps for flashing over web. Pls help.

-- 

3. session management in android

4. Fetch contact details in a multiple-selection Listview

5. Problem reading shared preferences in Gingerbread

6. we are hiring Android Developer in Chennai, India

7. Regarding Server connection