滚动文本延迟中的 Flex Mobile textInput [英] Flex Mobile textInput in scroller text lag

查看:23
本文介绍了滚动文本延迟中的 Flex Mobile textInput的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现输入到我的 flex 移动应用程序的 textInput 容器中的文本出现奇怪的延迟.当我在 textInput 中输入一些文本然后向任何方向滚动时,就会出现问题.整个屏幕和所有对象似乎都在移动,除了 textInput 中的文本.

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.

当我选择 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?

代码是基本的:

 <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>

推荐答案

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

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"

如果看起来像这样.

<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 Mobile textInput的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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