TextField - TextInputListener

Anything libgdx related goes here!

TextField - TextInputListener

Postby ahgul » Thu Oct 31, 2019 10:18 am

Hi all,

When you tap on a TextField in LibGDX, sometimes it can stay behind the onscreen-keyboard. You can't see what you are typing. I'm using TextInputListener to avoid this problem:

Code: Select all
textPassword.setOnscreenKeyboard(new TextField.OnscreenKeyboard() {
    @Override
    public void show(boolean visible) {
        Gdx.input.getTextInput(new Input.TextInputListener() {
            @Override
            public void input(String text) {
                textPassword.setText(text);
            }

            @Override
            public void canceled() {
            }

        }, "" , "", "");
    }
});


But in this way, data entry is possible in two steps:

Step-1: https://i.ibb.co/vYHGrJj/1.png

Step-2: https://i.ibb.co/m5D3FMq/2.png

This is not a user-friendly approach.

Is it possible to skip the first step and start the second step directly?
ahgul
 
Posts: 3
Joined: Thu Oct 03, 2019 9:02 am



Return to Libgdx

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 1 guest