新建或重命名自动弹出输入法

首先要添加包名:

import android.view.inputmethod.InputMethodManager;

然后加这两行:

InputMethodManager is = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);

is.toggleSoftInput(InputMethodManager.SHOW_FORCED,InputMethodManager.HIDE_IMPLICIT_ONLY);

原文地址:https://www.cnblogs.com/xiaofang-yin/p/3153090.html