Reputation: 133
When using 'TextField.setUseNativeTextInput(false)', the text in TextFields is scramled while editting. It looks like there are two texts placed on top of each other: the original text and the text being editted.
This issue occurs on Android, but not in the simulator. In the simulator it allso seems like two texts are placed on top of each other (slightly displaced), but both are being editted.
The issue can be replicated with the form below.
Kind Regards, Frans
import com.codename1.ui.Form;
import com.codename1.ui.Label;
import com.codename1.ui.TextArea;
import com.codename1.ui.TextField;
import com.codename1.ui.layouts.BoxLayout;
public class TextFieldWithTextForm extends Form
{
public TextFieldWithTextForm()
{
super("TextField with text", BoxLayout.y());
TextField.setUseNativeTextInput(false);
add(new Label("Remove the 4 and the k from the fields below"));
TextField one = new TextField("", "This field one", 20, TextArea.ANY);
one.setText("0123456789");
add(one);
TextField two = new TextField("", "This field two", 20, TextArea.ANY);
two.setText("abcedfghijklmnopqrstuvwxyz");
add(two);
}
}
Upvotes: 1
Views: 44
Reputation: 52770
We deprecated this call now, it should have been deprecated before as it dates back to no longer supported implementations.
Upvotes: 0