Flex的移动文字输入在滚动文字滞后 [英] Flex Mobile textInput in scroller text lag

查看:169
本文介绍了Flex的移动文字输入在滚动文字滞后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到在我的Flex移动应用程序输入到textInput容器中的文本的一个奇怪的滞后。当我在textInput中输入一些文本然后向任意方向滚动时,就会出现这个问题。除了textInput中的文本之外,整个屏幕和所有对象似乎都会移动。

当我选择textInput开始输入并出现软键盘并移动输入,然后将光标和输入的文本放在其他位置时,这成为一个非常大的问题屏幕。它看起来很糟糕。

这是一个普遍的性能问题吗?任何建议如何解决?

代码是基本的:

$ p $ < s:Scroller x = 0y =0width =100%height =100%verticalScrollPolicy =on>
< / s:Group>
< / s:Scroller>


解决方案

几个小时后,我自己找到了答案的谷歌搜索。在textinput语句中,您需要添加skinClass =spark.skins.mobile.TextInputSkin。

如果看起来像这样。

 < s:Scroller x =0y =0width =100%height =100% verticalScrollPolicy =on> 
< s:TextInput skinClass =spark.skins.mobile.TextInputSkin/>
< / s:Group>
< / s:Scroller>

这将防止文本在实际运行应用程序时从文本输入框中飞出。我确实看到了一些提到,当你这样做的时候软键盘不能工作,但是我似乎没有这个问题,所以也许已经解决了。希望这对其他人和我一样有用。

I have been seeing a weird lag in the text that is input into a textInput container in my flex mobile app. The issue occurs when I type in some text into a textInput then scroll in any direction. The entire screen and all objects seem to move, except for the text in the textInput.

This becomes a really big issue when I select the textInput to begin typing and the softkeyboard appears and shifts the input which then places the cursor and the typed text somewhere else on the screen. It looks pretty bad.

Is this a general performance issue? Any suggestions on how to fix?

code is basic:

 <s:Scroller x="0" y="0" width="100%" height="100%" verticalScrollPolicy="on" >
      <s:Group> 
         <s:TextArea softKeyboardType="number" id="ti1" y="145" width="390" height="75"                      fontSize="36" fontWeight="bold" horizontalCenter="0" text=" "/>
      </s:Group>
    </s:Scroller>

解决方案

I found the answer to this myself after a couple hours of googling. In the textinput statement, you need to add skinClass="spark.skins.mobile.TextInputSkin"

If would look like this.

<s:Scroller x="0" y="0" width="100%" height="100%" verticalScrollPolicy="on" >
    <s:Group>   
    <s:TextInput skinClass="spark.skins.mobile.TextInputSkin"/>     
    </s:Group>
    </s:Scroller>

This will prevent the text from "flying" out of the textinput boxes when you actually run the app. I did see some mention that the softkeyboard will not work when you do this, but I didnt seem to have an issue with that so perhaps that has been addressed. Hope this is as useful to others as it was to me.

这篇关于Flex的移动文字输入在滚动文字滞后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆