0
\$\begingroup\$

enter image description here

In my app's registration screen, the textfield is not wrapping text as I expected. Notice in the above image, the email field is not containing the text. I have set the size of the textfield using setSize() method but I couldn't find any way to wrap text. Is there any solution to this?

I'm using LibGDX v1.9.0.

EDIT: I don't have problem with overflowing but I think it should be hidden beyond the textfield borders.

UPDATE: It was indeed carelessness from my part. I actually included a padding to the textfield position which I didn't correct when defining its size. Issue got solved now. I don't know whether I should keep the question or delete it.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

The libGDX TextField is, according tho the API specification, a "A single-line text input field.".

That's why it's not wrapping the text.

\$\endgroup\$
6
  • \$\begingroup\$ Okay but still the text should be behind the borders of the textfield, you know? How can I make it that possible? \$\endgroup\$
    – Neerkoli
    Commented Apr 18, 2016 at 10:00
  • \$\begingroup\$ @BlackPanda Can you show more of your layout code? TextField will scroll the text inside its bounds if more text that can be showed is inputted so it looks like it's your layout that's the problem here. \$\endgroup\$
    – bornander
    Commented Apr 19, 2016 at 14:25
  • \$\begingroup\$ Here it is: pastebin.com/iVJVi8WS The text is indeed scrolling, but it is visible outside the bounds. \$\endgroup\$
    – Neerkoli
    Commented Apr 20, 2016 at 6:06
  • 1
    \$\begingroup\$ Sorry for wasting your time, but it was indeed carelessness from my part. I actually included a padding to the textfield position which I didn't correct when defining its size. Issue got solved now. \$\endgroup\$
    – Neerkoli
    Commented Apr 21, 2016 at 7:40
  • 1
    \$\begingroup\$ @BlackPanda Not a problem, glad you found the solution. \$\endgroup\$
    – bornander
    Commented Apr 21, 2016 at 11:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .