第一个问题是:我调用通过以下代码调用系统输入法:InputMethodManager inputMethodManager=(InputMethodManager) MainActivity.main.getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);竖屏时软键盘是正常的,但切换横屏后软键盘却没有“候选字”一栏,这样没法输入中文,如何解决呢?如图:
第二个问题是:不通过edittext或textview,如何接收输入的内容?在普通的view中重写了public InputConnection onCreateInputConnection(EditorInfo outAttrs)方法,但似乎没有被调用。求高手解答!!

解决方案 »

  1.   

    第二个问题: http://batfree.blogspot.com/2011/04/android-how-to-enable-inputmethod-for.html
      

  2.   

    这是什么输入法?
    其它输入法也这样吗?candidate view记得应该是输入法自己控制的。
      

  3.   

    试过其它输入法也是这样
    通过在public InputConnection onCreateInputConnection(EditorInfo outAttrs)设置参数
    outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI;
    可以解决