Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LWUIT textfield

if method setMaxSize(1) is called, tactile keypad only inputs first character .e.g. can only write A in "ABC or D in "DEF" etc any ideas on how to solve this

like image 703
user1202198 Avatar asked Feb 01 '26 06:02

user1202198


1 Answers

Interesting. I haven't tried this myself but I can see why this would fail. I doubt whether there is a simple solution for this other that overriding the text field input and implementing the single character behavior yourself. Just set the max length to 2 and override the insertChar method by invoking super.setText() with the given char.

like image 169
Shai Almog Avatar answered Feb 04 '26 01:02

Shai Almog



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!