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. Stable Built environment for Nexus S

Hello friends,

I am looking for a stable built environment to build a custom ROM.
BUT all branches I tryed dont work clean in Nexus S.

My attemts:
repo init -u git://android.git.kernel.org/platform/manifest.git -b
android-2.3.3_r1
repo init -u git://android.git.kernel.org/platform/manifest.git -b
android-2.3.3_r1.1
repo init -u git://android.git.kernel.org/platform/manifest.git -b
android-2.3.4_r1
repo init -u git://android.git.kernel.org/platform/manifest.git -b
gingerbread
repo init -u git://android.git.kernel.org/platform/manifest.git -b
master

On all branches there are problems with NFC ("an error occures" is
showing when I activate it)
And when I try to activate WLAN then thy System is hang up and I have
to remove the battery to restart it.

On Installation I get an error that the baseband version is not right,
my baseband is I9020XXKB3
If I add my baseband version to board-info then installation is OK.

Maybe is that the reason for my Hardware Errors with NFC and WLAN?

would be happy for some infos and tips

best regards
Markus

-- 

2. Error saat mengkompile Android Gingerbread 2.3.3

Saat saya mengcompile source android Gingerbread 2.3.3 ada pesan error
yang saya terima seperti ini :
build/core/binary.mk:25: *** external/stlport: Invalid
LOCAL_NDK_VERSION '4' Choices are .  Stop.)

Untuk informasi saya sudah melakukan download dan Compile di Linux
Ubuntu 10.04 Lucid 64Bit sesuai dengan petunjuknya.

Ada ide bagaimana solusinya?

Terima kasih
SGP

-- 
"

3. HttpsURLConnection's getResponseCode() returns -1

4. javascript in webview to java?

5. How to Override progress bar message i.e.. 0/100

6. Signature and certificate

7. requestLocationUpdates ignore minTime parameter?