Reputation: 4670
How can I handle event in EditText Field?.
Example: when I enter some text in EditText then what I have to do generate custom layout? below is my screen.Does any one have idea please tell me.
Upvotes: 0
Views: 284
Reputation: 2862
try this
EditField text=new EditField()
{
protected boolean keyChar(char key, int status, int time)
{
if((int)key==10)//10 is ASCII code of "Enter" key
{
add(new LabelField("New Field"));
}
return super.keyChar(key, status, time);
}
};
add(text);
after enter all data just click on enter then new label will appear on screen
Upvotes: 1