requestFocus() works for EditText, but not Button, because the Button is not focusable in touch mode. Call isFocusableInTouchMode() first to check if a component could be foced.
On 7 nov 2008, 20:01, april <[email protected]> wrote: > I am using emulator. In onCreate() function, I used > "button.requestFocus()" . But the button didn'tgetfocus. > > Has someone tried togetfocusfor a component? thanks! > > April --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

