Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/24.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
Actionscript 3 Flex 4.6手机-文本区域和;文本输入皮肤问题_Actionscript 3_Apache Flex_Textarea_Flex4.6 - Fatal编程技术网

Actionscript 3 Flex 4.6手机-文本区域和;文本输入皮肤问题

Actionscript 3 Flex 4.6手机-文本区域和;文本输入皮肤问题,actionscript-3,apache-flex,textarea,flex4.6,Actionscript 3,Apache Flex,Textarea,Flex4.6,这适用于AIR 3.1上的Flex 4.6。我在AIR 3.5中也遇到了同样的问题 <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <!-- Split View Navigator used for Tablet for panelled functionality --&g

这适用于AIR 3.1上的Flex 4.6。我在AIR 3.5中也遇到了同样的问题

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
在我目前使用的应用程序中,我遇到了来自文本输入的文本问题,文本区域在视图之间停留在屏幕上,同时滚动等等

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
我看到的修复建议是对textinput和textarea使用不同的skinclass,如下所示:

skinClass="spark.skins.spark.TextAreaSkin"
<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
是使用TextAreaSkin的建议之一的示例

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
然而,当使用这个和等价的TextInputSkins时,我现在遇到了一些相当大的问题

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
在iPad2(iOS6)上,我们使用的软键盘根本不会出现,而在三星Galaxy平板电脑(Android 4)上,键盘只允许输入数字和某些特殊字符(如果我按住某个特定字母,它也允许输入大写字母,但在正常情况下不允许输入)

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
我在这里发现了另一个与我类似的问题: 但它没有解决办法

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
奇怪的是,在我的Android(Desire)手机上,或者如果我在三星Galaxy平板电脑上使用不同的键盘应用程序(快捷键),一切都可以正常工作

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
我在我们的另一个应用程序中对此进行了测试,我在那个应用程序中遇到了相同的问题。(我必须为该应用程序使用皮肤的唯一实例是不可编辑的文本区域——我从未见过我在该应用程序中提到的第一个问题)

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
编辑:我已经创建了一个相当基本的演示,其中包含了一些视图,在这些视图中我复制了我遇到的大多数问题。这是一个使用splitview导航器的移动应用程序。 主应用程序文件:

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>

主视图:

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>

测试1
测试2
测试3
测试4
测试5
TestView:

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
    xmlns:s="library://ns.adobe.com/flex/spark" title="TestView">
<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<s:TextArea id="testing2" />
</s:View>

TestView2:

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
    xmlns:s="library://ns.adobe.com/flex/spark" title="TestView2">
<fx:Script>
    <![CDATA[
        protected function goBack():void
        {
            navigator.popView();                
        }
    ]]>
</fx:Script>
<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:layout>
    <s:VerticalLayout />
</s:layout>
<s:TextArea id="testing2" />
<s:Button label="Back" click="goBack()" />
</s:View>

HomeView上的主文本区域应用了skinclass,这对我来说有以下问题:

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
iOS(iPad2):根本没有软键盘

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
Android(三星Galaxy标签):键盘出现,但只允许数字和某些特殊字符

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>

我无法在屏幕上保留文本的情况下重现问题(没有其他skinclass),但在Android上,如果您在“TestView”的文本框中键入内容并单击下一屏幕,则加载视图后TestView中的文本将消失(直到您单击文本框)。如果你有足够长的屏幕,如果不使用其他skinclass,滚动文本框会导致很多问题。

好的,我发现了我的问题所在。结果是非常简单的

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
我用错皮肤了。有一种特定于移动设备的皮肤称为:

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
spark.skins.mobile.TextInputSkin

它还没有完全发挥作用,但事实上我已经让一些东西发挥作用了,这让我松了一口气。

好吧,我发现了我的问题所在。结果是非常简单的

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
我用错皮肤了。有一种特定于移动设备的皮肤称为:

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
spark.skins.mobile.TextInputSkin

它还不能完美地工作,但事实上,我已经让一些东西工作了,这让我松了一口气。

我已经为StageTextAreaSkin和StageTextInputSkin创建了一个解决方案,使它们能够在滚动条中使用。如果您希望使用TextInputSkin的唯一原因是支持滚动,这应该会有所帮助。可在GitHub上获得:

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
它通过更改StyleableStageText类来侦听触摸事件,并更改祖先滚动器组件的位置

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>

希望Apache能很快解决这个错误,并且不需要解决方法。

我已经为StageTextAreaSkin和StageTextInputSkin创建了一个解决方法,它支持在滚动程序中使用这些皮肤。如果您希望使用TextInputSkin的唯一原因是支持滚动,这应该会有所帮助。可在GitHub上获得:

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
它通过更改StyleableStageText类来侦听触摸事件,并更改祖先滚动器组件的位置

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>

希望Apache能够很快解决这个错误,并且不需要解决方法。

当我们需要在mobile中对TextInput和TextArea进行蒙皮时,我们需要对默认的spark.skins.mobile.MobileSkin(或MobileTextInputSkin)进行子类化,因为与默认的MXML蒙皮相比,使用Actionscript的mobile蒙皮重量较轻。如果在三星手机和平板电脑(不使用默认的谷歌安卓键盘)等设备上使用MXML对TextInput和TextArea进行蒙皮,您将遇到一个问题,即当输入被聚焦时,软键盘不会出现

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
另一件事是:我们不应该在TextInput和TextArea上使用restrict属性,否则,我们会在文本不断相互覆盖的情况下出错。
希望有此帮助,Rjs37

当我们需要在mobile中对TextInput和TextArea进行蒙皮时,我们需要对默认的spark.skins.mobile.MobileSkin(或MobileTextInputSkin)进行子类化,因为与默认的MXML蒙皮相比,使用Actionscript的mobile蒙皮重量较轻。如果在三星手机和平板电脑(不使用默认的谷歌安卓键盘)等设备上使用MXML对TextInput和TextArea进行蒙皮,您将遇到一个问题,即当输入被聚焦时,软键盘不会出现

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>
另一件事是:我们不应该在TextInput和TextArea上使用restrict属性,否则,我们会在文本不断相互覆盖的情况下出错。
希望这有帮助,Rjs37

分享一些代码来复制这个问题。您可能还需要指定有问题的确切设备;以及他们安装的操作系统。加上你的Flex版本(我从标签上猜是4.6)和你正在使用的AIR版本。@www.Flextras.com我已经在标签和标题中包含了Flex版本,但现在我也将其添加到了帖子中。此外,我现在添加了
<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<!-- Split View Navigator used for Tablet for panelled functionality -->
<s:SplitViewNavigator width="100%" height="100%">
    <s:layout.landscape>
        <s:HorizontalLayout />
    </s:layout.landscape>
    <s:layout.portrait>
        <s:VerticalLayout />
    </s:layout.portrait>
    <s:ViewNavigator width.landscape="35%" height.landscape="100%"
                     width.portrait="100%" height.portrait="30%" 
                     firstView="views.TestView" />
    <s:ViewNavigator width="100%" height="100%" height.portrait="100%"
                     firstView="views.TestFormHomeView" />
</s:SplitViewNavigator>
</s:Application>
<fx:Script>
    <![CDATA[
        protected function buttonClick():void
        {
            navigator.pushView(TestView2);
        }

        protected function listClick():void
        {
            navigator.popView();
            navigator.pushView(TestFormHomeView);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Scroller width="100%" height="100%">
    <s:HGroup width="100%">
        <s:List width="50%" click="listClick()">
            <s:ArrayCollection>
                <fx:String>Test1</fx:String>
                <fx:String>Test2</fx:String>
                <fx:String>Test3</fx:String>
                <fx:String>Test4</fx:String>
                <fx:String>Test5</fx:String>
            </s:ArrayCollection>
        </s:List>
        <s:VGroup width="50%">
            <s:TextArea id="testing" skinClass="spark.skins.spark.TextAreaSkin" />
            <s:TextArea id="testing2" />
            <s:Button click="buttonClick()" label="Next Screen" />
        </s:VGroup>
    </s:HGroup>
</s:Scroller>
</s:View>