In the Android development process about EditText at setfocusable (false), after setting setfocusable (TRUE) when you need to get the focus input again, the problem is still not getting focus:
Workaround:
Set it to EditText!
Et.setfocusable (TRUE);
Et.setfocusableintouchmode (TRUE);
Et.requestfocus ();
Et.findfocus ();
If you regain focus and then SetText ("...") may fail, you can try adding a et.invalidate () after SetText ();
Android EditText Focus Issue
In Android, to get the focus of the control, you need to setfocus it first and then Requestfocus. Take the button as an example: Btn.setfocusable (True); Btn.setfocusableintouchmode (true); then get focus: Btn.requestfocus (); Btn.requestfocusfromtouch ();
How does Android specify a EditText priority to get focus?
<edittext
Android:id= "@+id/text"
Android:layout_width= "Fill_parent"
android:layout_height= "Wrap_content"
android:layout_weight= "0"
Android:paddingbottom= "4" ><requestfocus/></edittext>
It's supposed to be the last <requestfocus./> controls are valid
Android EditText regain focus issue