0
\$\begingroup\$

I want to take input in a TextField but the keyboard hides the view, so I want to scroll it by adding padding to it since table is inside ScrollPane, but the padding is not changing on click event.

    TextField name = new TextField("", skin);
    Cell c;
    Table mode = new Table;
    mode.row().padBottom(2);

    mode.add(single).right().size(14,10).fill();
    mode.add(multiple).left().size(14,10).fill();
    c = newgamemode.row();
    mode.add(playerlabel).expandX();
    mode.add(name).expandX().size(14,8);
    mode.row();

Here is my ClickListener:

    name.addListener( new ClickListener() {
        @Override
        public void clicked (InputEvent event, float x, float y){
            c.padBottom(25);
        }
    });

Here is a screenshot for clarity: enter image description here

\$\endgroup\$
  • \$\begingroup\$ Can no-one solve this problem??? \$\endgroup\$ – Shubham Agrawal Apr 27 at 23:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.