效果结束前不显示内容
我有一个带有手风琴的应用程序
<mx:Accordion minHeight="200" includeIn="radegund0" top="10" bottom="10" left="10" right="10" openDuration="2000" openEasingFunction="{Elastic.easeOut}">
<s:NavigatorContent width="100%" height="100%">
<!--content1-->
</s:NavigatorContent>
<s:NavigatorContent width="100%" height="100%">
<!--content2-->
</s:NavigatorContent>
</mx:Accordion>
,但是当第一次单击第二个选项卡时,直到效果结束才显示内容。有什么办法可以解决这个问题吗?
I have an application whit accordion
<mx:Accordion minHeight="200" includeIn="radegund0" top="10" bottom="10" left="10" right="10" openDuration="2000" openEasingFunction="{Elastic.easeOut}">
<s:NavigatorContent width="100%" height="100%">
<!--content1-->
</s:NavigatorContent>
<s:NavigatorContent width="100%" height="100%">
<!--content2-->
</s:NavigatorContent>
</mx:Accordion>
but when click on the second tab for the first time the content is not shown until the effect is over. Is there any way to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
具有多个视图的容器(例如 ViewStack 和 Accordion)不会立即创建其所有后代,而是仅创建在初始视图中可见的那些后代。 Flex 推迟了最初不可见的后代的创建,直到用户导航到包含它们的视图,这就是这里发生的情况。在 Accordian 上设置
creationPolicy="all"
,以便从一开始就在 Accordian 的所有视图中创建所有控件。Containers with multiple views, such as the ViewStack and Accordion, do not immediately create all of their descendants, but only those descendants that are visible in the initial view. Flex defers the creation of descendants that are not initially visible until the user navigates to a view that contains them, which is what's happening here. Set
creationPolicy="all"
on the Accordian, to create all controls in all views of the Accordian from the start.