Problem with EditText.requestFocus()
Posted
by synic
on Stack Overflow
See other posts from Stack Overflow
or by synic
Published on 2010-03-29T01:49:04Z
Indexed on
2010/03/29
1:53 UTC
Read the original article
Hit count: 364
android
In the onCreate() of an activity, I've got a call to requestFocus() on an EditText. Immediately after, I've got the following:
System.out.println(mEdit.isFocusableInTouchMode());
System.out.println(mEdit.isFocusable());
System.out.println(mEdit.isFocused());
These were just put in while I was trying to figure out what is wrong with this activity... they all print "true". However, as you may have guessed, the EditText does NOT have focus, and if I try to start typing, nothing happens. I have to click on the EditText to being typing.
I can't see that anything else has focus, but obviously something has to have it.. how can I find out what it is?
© Stack Overflow or respective owner