TextField contraint in LWUIT
I want to use textfield in my j2me application where in want to give constraint that user can enter 4digit numeric data only?? How can it be possible.
i had used this:-
TxtField1.setConstraint(TextField.NUMERIC);
Which makes 开发者_高级运维my textfield numeric but can't had constraint which enter 4 digits only!- I want to use Sprite class in LWUIT.
As i want to make clock timer type of application.That when user enter the time in textfield like (10,7,3 etc..) and press ok User can see the number below the screen moving 0,1,2....etc.Now i had taker the image of 0-9 number to give a better look.Now i want to change that image at run time.
Means when the number comes 25.Then i have to take the image of number 2 and 5 For this purpose i want sprite
Is there any other way i can do this!!
Can anyone please help me for this? Thanks in advance
Use a list of images fixed to the center and set selected index. You can also use a label with an image and use Container.replace() which allows you to assign a transition for the replace operation.
There is no need for sprites in LWUIT.
Use setMaxSize(4)
for limit the 4 digits only. AFAIK you can't use sprite with LWUIT. Why you want use Sprite with LWUIT?
精彩评论