when turn on other activity page, I want to show soft keyboard
automatically.
i get this source, but I don't know why use part of delay?
I want to know WHY, and is there other way to show the softkeyboard?
InputMethodManager imm;
@Override
public void onCreate(Bundle icicle) {
TimerTask myTask = new TimerTask(){
public void run(){
imm =
(InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
imm.showSoftInput(getCurrentFocus(), InputMethodManager.SHOW_FORCED);
}
};
Timer timer = new Timer();
timer.schedule(myTask, 500);
@Override
protected void onPause() {
super.onPause();
imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
}
thanks alot to read this one ^^
--
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