您的位置:首页 > 其它

Activity中弹软键盘

2016-07-11 17:28 302 查看
name_ed.setFocusable(true);
name_ed.setFocusableInTouchMode(true);
Timer timer = new Timer();
timer.schedule(new TimerTask() { //让软键盘延时弹出,以更好的加载Activity
public void run() {
InputMethodManager inputManager =
(InputMethodManager) name_ed.getContext().
getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.showSoftInput(name_ed, 0);
}
}, 500);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: