Android soft keyboard in a fullscreen Surface View

前端 未结 1 1988
梦如初夏
梦如初夏 2020-12-22 09:55

HI! I am currently extending an Android Game Framework,which I found in a Book written by Mario Zechner (who also develops Libgdx).

It is working gr

1条回答
  •  有刺的猬
    2020-12-22 10:19

    I found a solve :D https://stackoverflow.com/questions/33561137/soft-keyboard-not-receiving-touches-over-surfaceview

    I did override onCreateInputConnection method on the CustomSurfaceView class, like in the posted link.

    @Override
      public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
       InputConnection conn = super.onCreateInputConnection(outAttrs);
       outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_FULLSCREEN;
       return conn;
    }
    

    it works now, pls try it out, I will upload right away to see if it works on your device too.

    0 讨论(0)
提交回复
热议问题