这是创建StageText的代码
var myTextField:StageText = new StageText();
myTextField.returnKeyLabel = ReturnKeyLabel.SEARCH;
myTextField.text = tlf.text;
myTextField.editable = true;
myTextField.fontFamily = "Ariel"
myTextField.fontSize = 40;
myTextField.color = tlf.textColor
myTextField.textAlign = TextFormatAlign.RIGHT
myTextField.stage = stage;
myTextField.viewPort = new Rectangle(p.x, p.y, tlf.width*screenUtil.xScaleFactor,tlf.height*screenUtil.yScaleFactor);
txtInputVo.stageText = myTextField;
myTextField.locale = "he-IL";
myTextField.addEventListener(FocusEvent.FOCUS_IN, onInFocus);
myTextField.addEventListener(FocusEvent.FOCUS_OUT, onOutFocus);
protected function onInFocus(event:FocusEvent):void
{
var sTxt:StageText = event.currentTarget as StageText;
var textInputVo:TextInputVO = getTextInputVO(sTxt);
if(textInputVo.defultText == sTxt.text)
{
sTxt.text = "";
}
}
它工作得很好,键盘出现了,您可以插入和编辑文本 但是光标没有显示出来?
到目前为止,我只在Android Air 3.6上测试了它。
答案 0 :(得分:1)
尝试“Arial”而不是“Ariel”作为字体系列