Select Android 7.0 中的软键盘

Select soft keyboard in Android 7.0

我的自定义键盘在软键盘列表中不可见。怎样才能在输入法对话框中列出呢? 它在其他 OS 中工作正常,但在 Android 牛轧糖中它不显示。

我正在使用下面的源代码。

    private void showInputMethodPicker() {
        InputMethodManager imeManager = (InputMethodManager) getApplicationContext().getSystemService(INPUT_METHOD_SERVICE);
        if (imeManager != null) {
            imeManager.showInputMethodPicker();
        } else {
        Toast.makeText(this, "Error in keyboard", Toast.LENGTH_LONG).show();
    }
}
boolean isListedInKeyboardMethod() {

        boolean flag = false;
        InputMethodManager imeManager = (InputMethodManager) getApplicationContext().getSystemService(INPUT_METHOD_SERVICE);
        List<InputMethodInfo> InputMethods = imeManager.getEnabledInputMethodList();
        for (InputMethodInfo info : InputMethods) {
            if(info.getId().equalsIgnoreCase(keyboard_name))
                return true;
        }

        return flag;

    }



private void showInputMethodPicker() {
    InputMethodManager imeManager = (InputMethodManager) getApplicationContext().getSystemService(INPUT_METHOD_SERVICE);
    if (imeManager != null) {
        imeManager.showInputMethodPicker();
    } else {
        Toast.makeText(this, "Error in keyboard", Toast.LENGTH_LONG).show();
    }
}