Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex Flex防止软键盘关闭_Apache Flex_Mobile_Air_Soft Keyboard - Fatal编程技术网

Apache flex Flex防止软键盘关闭

Apache flex Flex防止软键盘关闭,apache-flex,mobile,air,soft-keyboard,Apache Flex,Mobile,Air,Soft Keyboard,我有一个布局简单的移动AIR应用程序: <s:layout><s:VerticalLayout /></s:layout> <s:TextArea width="100%" height="100%" /> <HGroup width="100%" > <s:Button label="button" /> <s:Button label="button" /> <s:Bu

我有一个布局简单的移动AIR应用程序:

<s:layout><s:VerticalLayout /></s:layout>

<s:TextArea width="100%" height="100%" />

<HGroup width="100%" >
     <s:Button label="button" />
     <s:Button label="button" />
     <s:Button label="button" />
</HGroup>

通过在主应用程序中设置resizeForSoftKeyboard=“true”,将应用程序设置为在软键盘打开时调整大小。textArea使用默认的Flex 4.6皮肤。
我的问题是,如果用户通过在我的文本区域中键入文本来打开键盘,他将无法单击文本区域下方的按钮,因为只要他尝试单击按钮,软键盘就会降低(因为焦点在文本区域之外?)并立即再次打开(因为鼠标向下位置现在位于文本区域上方?)

如何防止软键盘关闭,以便用户能够单击文本区域和键盘之间的按钮


谢谢

单击按钮时,可能会添加一个事件以打开键盘,即在该按钮的单击事件处理程序中

另外(我自己也没有尝试过),但是在该视图键盘的deactivate事件中,添加event.preventDefault()


布莱恩这很奇怪。我试着自己运行你的程序,一点问题也没有:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="320" resizeForSoftKeyboard="true">
    <s:layout><s:VerticalLayout /></s:layout>

    <s:TextArea width="100%" height="100%" />

    <s:HGroup width="100%" >
        <s:Button label="button" click="trace('clicked')"/>
        <s:Button label="button" click="trace('clicked')" />
        <s:Button label="button" click="trace('clicked')" />
    </s:HGroup>
</s:Application>

触摸文本区域时键盘打开,单击按钮时键盘关闭(不再打开),调试时控制台中会显示单击


你没有发布整个应用程序,整个程序中有我没有的东西吗?在这种情况下,我会看看这些是否会干扰用户界面。

我两种都试过了。问题是,按钮没有被点击。我认为这是事件的顺序:1。文本区域失去焦点2。键盘关闭,键盘停用事件已调度。3.mouseDown在(扩展的)文本区域上注册,所以键盘返回。