How to set AlertDialog button focus?

by blindfold » Sat, 30 Aug 2008 04:46:55 GMT


Sponsored Links
 I was looking for something like .requestFocus() to set focus for a
default button in a two-button AlertDialog, such that the user need
only press the enter key when accepting the default button (the one
that has focus). It seems though that neither PositiveButton nor
NegativeButton get a default focus, and I could not find a method to
set focus to either one of them. So how can one set focus to a
particular AlertDialog button?

Thanks.

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



How to set AlertDialog button focus?

by Chihau Chau » Sat, 30 Aug 2008 05:38:38 GMT


 Hi, maybe this url would be util for you
 http://www.maximyudin.com/2008/02/25/android/how-to-use-alertdialogbuilder-in-android-applications/ 

2008/8/29 blindfold <[EMAIL PROTECTED]>



-- 
/chihau

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


Sponsored Links


How to set AlertDialog button focus?

by blindfold » Sat, 30 Aug 2008 16:39:33 GMT


 Thanks, but here too I have to press an arrow key or something before
any of the buttons gets focus. I want one of the buttons to have focus
right away, such that just pressing OK/Enter/Fire will activate that
button without a need to click it or navigate to it.




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



Other Threads

1. Syntax error in C2DM Registering in Google example

Well, its not that big deal but i found a Syntax error in the code for
C2DM Registering from this site http://code.google.com/android/c2dm/index.html
at the error in the line below .

         registrationIntent.putExtra("app",
PendingIntent.getBroadcast(this, 0, new Intent(), 0);

where they missing the end ")" and here's my magical fix :)

         registrationIntent.putExtra("app",
PendingIntent.getBroadcast(this, 0, new Intent(), 0));

-- 

2. connections problem ...

hello

Sorry to trouble you ... i'm new to  developing for android and i have
a problem.
I cant debug my app on the device ... by running abd devices i can
only see the emulator!

any ideeas?

thanks,
Adrian

-- 

3. Issue with populating a ViewFlipper child View with a ListView

4. LVL Sample application problems

5. Solved: Static variables cleared in JUnit tests! (???)

6. Droid's Hardware cannot handle mobile hotspot.. says Motorola.. :)

7. isReachable() is about 1000X slower than it should be