При использовании «TextField.setUseNativeTextInput (false)» текст в TextFields скремблируется при редактировании.Похоже, что два текста расположены друг над другом: исходный текст и редактируемый текст.
Эта проблема возникает на Android, но не в симуляторе.В симуляторе также кажется, что два текста размещены друг над другом (слегка смещены), но оба они редактируются.
Проблема может быть воспроизведена с помощью формы ниже.
ВидС уважением, Франс
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);
}
}