Color is inverted.
0x000000 -> 0xFFFFFF
0x404040 -> 0xBFBFBF
0xFFFFFF -> 0x000000
Seems Android try to set dark theme inside AIR app.
But it happens time to time (not always on same device). Seems depend of actions order (change theme, run app). Can it be because of isEditable = false
property?
My code. I use StageTextTextEditor instead of existing simple Starling TextField (_mcItem.t_msg) to correctly display smiles|emoji.
var txtInput:TextInput = new TextInput();
txtInput.x = _mcItem.t_msg.x;
txtInput.y = _mcItem.t_msg.y;
txtInput.width = _mcItem.t_msg.width;
txtInput.height = _mcItem.t_msg.height;
txtInput.text = _mcItem.t_msg.text;
txtInput.verticalAlign = "top";
txtInput.textEditorFactory = function ():ITextEditor {
var editor:StageTextTextEditor = new StageTextTextEditor();
editor.fontFamily = null; // to use device font
editor.fontSize = 20;
editor.fontWeight = FontWeight.BOLD;
editor.color = color;
editor.isEditable = false;
editor.multiline = true;
editor.textAlign = TextFormatAlign.LEFT;
return editor;
};
_mcItem.removeChild(_mcItem.t_msg);
_mcItem.addChild(txtInput);
_mcItem.t_msg = txtInput;
_mcItem.t_msg.touchable = false;
Video with text color change after entering 2 symbols - https://photos.google.com/share/AF1QipO-DpvayAicAWbR9hIozhrTOa_CrrZYpohPIuAegrG1F6jvxcBJJgPZJ-1CN5lAZA/photo/AF1QipOmpIfkzAaHg6-kI7JE8ON9JqaASTyQNfVpvnVq?key=LU56dG9EZXdYdlhqYWFXSEl0NzJKVnU4US1lQkFR