How do libgdx detect keyboard presence

后端 未结 3 1351
盖世英雄少女心
盖世英雄少女心 2020-12-10 05:29

When writing in the Textfield, I need my textfield to move upwards in order to let the textfield be visible when the keyboard pops up.

Does libgdx have some kind of

3条回答
  •  既然无缘
    2020-12-10 06:00

    Try

    Gdx.input.isPeripheralAvailable(Input.Peripheral.OnscreenKeyboard);
    

    I just looked this up in the docs, don't know if it actually does the trick. But the

    Gdx.input.setOnscreenKeyboardVisible(boolean visible);
    

    method could be used as well (like this YOU define when the keyboard is visible and when not).

提交回复
热议问题