android - How do libgdx detect keyboard presence -


when writing in textfield, need textfield move upwards in order let textfield visible when keyboard pops up.

does libgdx have kind of method returns true if keyboard visible , false when down?

the following code detect when press textfield, prevent showing keyboard , open native dialog moves , down keyboard. take input native dialog , put in textfield:

    textfield.setonscreenkeyboard(new textfield.onscreenkeyboard() {         @override         public void show(boolean visible) {             //gdx.input.setonscreenkeyboardvisible(true);             gdx.input.gettextinput(new input.textinputlistener() {                 @override                 public void input(string text) {                     textfield.settext(text);                 }                  @override                 public void canceled() {                     system.out.println("cancelled.");                 }             }, "title", "default text...");         }     }); 

good luck!


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -