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);
Activity中弹软键盘
最新推荐文章于 2022-07-07 09:59:03 发布