您的位置:首页 > 移动开发 > Android开发

android 安卓edittext自动弹出数字键盘

2016-11-10 14:43 253 查看
et.setFocusable(true);
et.setFocusableInTouchMode(true);
et.setInputType(EditorInfo.TYPE_CLASS_NUMBER);
Timer timer = new Timer();
timer.schedule(new TimerTask()
{
public void run()
{
InputMethodManager inputManager =(InputMethodManager)et.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.showSoftInput(et, 0);
}
}, 500);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息