vniew 属性hold是什么意思

Promotions
Estimated Shipping
&?xml version="1.0" encoding="utf-8"?&
&s:View xmlns:fx="/mxml/;
xmlns:s="library:///flex/spark" title="View1"&
&fx:Script&
protected function onActionBarClickHandler(event:MouseEvent):void
if (actionBarVisible)
this.actionBarVisible =
b.label="Show ActionBar";
this.actionBarVisible =
b.label="Hide ActionBar";
protected function onTabBarClickHandler(event:MouseEvent):void
if (tabBarVisible)
this.tabBarVisible =
b2.label="Show TabBar";
this.tabBarVisible =
b2.label="Hide TabBar";
&/fx:Script&
&s:VGroup width="100%" height="100%" horizontalAlign="center" top="50"&
&s:TextArea text="This is View 1" editable="false"/&
&s:HGroup&
&s:Button id="b" label="Hide ActionBar" click="onActionBarClickHandler(event)"/&
&s:Button id="b2" label="Hide TabBar" click="onTabBarClickHandler(event)"/&
&/s:HGroup&
&/s:VGroup&
&?xml version="1.0" encoding="utf-8"?&
&s:TabbedViewNavigatorApplication xmlns:fx="/mxml/;
xmlns:s="library:///flex/spark"&
&s:ViewNavigator label="View1" width="100%" height="100%" firstView="views.View1"/&
&s:ViewNavigator label="View2" width="100%" height="100%" firstView="views.View2"/&
&s:ViewNavigator label="View3" width="100%" height="100%" firstView="views.View3"/&
&/s:TabbedViewNavigatorApplication&
&?xml version="1.0" encoding="utf-8"?&
&s:TabbedViewNavigatorApplication xmlns:fx="/mxml/;
xmlns:s="library:///flex/spark"
applicationComplete="onApplicationComplete(event)"&
&fx:Script&
import mx.events.FlexE
import spark.events.IndexChangeE
protected function onApplicationComplete (event:FlexEvent):void{
vn1.actionBar.visible=
tabbedNavigator.addEventListener(IndexChangeEvent.CHANGE,onChange);
protected function onChange(event:IndexChangeEvent):void
if (event.newIndex==0)
vn1.activeView.actionBarVisible=
&/fx:Script&
&s:ViewNavigator id="vn1" label="View1" width="100%" height="100%" firstView="views.View1"/&
&s:ViewNavigator label="View2" width="100%" height="100%" firstView="views.View2"/&
&s:ViewNavigator label="View3" width="100%" height="100%" firstView="views.View3"/&
&/s:TabbedViewNavigatorApplication&
&fx:Style&
@namespace s "library:///flex/spark";
s|TabbedViewNavigator
skinClass: ClassReference("skins.TabbedViewNavigatorSkin");
&/fx:Style&
override protected function layoutContents(unscaledWidth:Number, unscaledHeight:Number):void
super.layoutContents(unscaledWidth, unscaledHeight);
var tabBarHeight:Number = 0;
if (tabBar.includeInLayout)
tabBarHeight = Math.min(tabBar.getPreferredBoundsHeight(), unscaledHeight);
tabBar.setLayoutBoundsSize(unscaledWidth, tabBarHeight);
tabBar.setLayoutBoundsPosition(0, unscaledHeight - tabBarHeight);
tabBarHeight = tabBar.getLayoutBoundsHeight();
// backgroundAlpha is not a declared style on ButtonBar
// TabbedViewNavigatorButtonBarSkin implements for overlay support
var backgroundAlpha:Number = (_isOverlay) ? 0.75 : 1;
tabBar.setStyle("backgroundAlpha", backgroundAlpha);
if (contentGroup.includeInLayout)
var contentGroupHeight:Number = (_isOverlay) ? unscaledHeight : Math.max(unscaledHeight - tabBarHeight, 0);
contentGroup.setLayoutBoundsSize(unscaledWidth, contentGroupHeight);
contentGroup.setLayoutBoundsPosition(0, 0);
if (tabBar.includeInLayout)
tabBarHeight = Math.min(tabBar.getPreferredBoundsHeight(), unscaledHeight);
tabBar.setLayoutBoundsSize(unscaledWidth, tabBarHeight);
tabBar.setLayoutBoundsPosition(0,0);
tabBarHeight = tabBar.getLayoutBoundsHeight();
// backgroundAlpha is not a declared style on ButtonBar
// TabbedViewNavigatorButtonBarSkin implements for overlay support
var backgroundAlpha:Number = (_isOverlay) ? 0.75 : 1;
tabBar.setStyle("backgroundAlpha", backgroundAlpha);
if (contentGroup.includeInLayout)
var contentGroupHeight:Number = (_isOverlay) ? unscaledHeight : Math.max(unscaledHeight - tabBarHeight, 0);
contentGroup.setLayoutBoundsSize(unscaledWidth, contentGroupHeight);
contentGroup.setLayoutBoundsPosition(0, 0);
&s:View xmlns:fx="/mxml/;
xmlns:s="library:///flex/spark" title="Search Location..." actionBarVisible="false" xmlns:json="com.adobe.serialization.json.*" &布局属性_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
评价文档:
阅读已结束,如果下载本文需要使用
想免费下载本文?
你可能喜欢2137人阅读
在使用基于 TabbedViewNavigatorApplication 的Flex移动应用程序的过程中,你可能需要隐藏动作条组件或标签组件。例如,在特定视图下,你可能想获取更大的屏幕空间,或者,你只是想根据个人喜好设置显示界面。在这些情况下,你可以使用 View 类中的两个有效的道具:actionBarVisible 以及
tabBarVisible,来达到预期的效果。
&fx:Style&
@namespace s &library:///flex/spark&;
s|TabbedViewNavigator
skinClass: ClassReference(&skins.TabbedViewNavigatorSkin&);
&/fx:Style&
override protected function layoutContents(unscaledWidth:Number, unscaledHeight:Number):void
super.layoutContents(unscaledWidth, unscaledHeight);
var tabBarHeight:Number = 0;
if (tabBar.includeInLayout)
tabBarHeight = Math.min(tabBar.getPreferredBoundsHeight(), unscaledHeight);
tabBar.setLayoutBoundsSize(unscaledWidth, tabBarHeight);
tabBar.setLayoutBoundsPosition(0, unscaledHeight - tabBarHeight);
tabBarHeight = tabBar.getLayoutBoundsHeight();
// backgroundAlpha is not a declared style on ButtonBar
// TabbedViewNavigatorButtonBarSkin implements for overlay support
var backgroundAlpha:Number = (_isOverlay) ? 0.75 : 1;
tabBar.setStyle(&backgroundAlpha&, backgroundAlpha);
if (contentGroup.includeInLayout)
var contentGroupHeight:Number = (_isOverlay) ? unscaledHeight : Math.max(unscaledHeight - tabBarHeight, 0);
contentGroup.setLayoutBoundsSize(unscaledWidth, contentGroupHeight);
contentGroup.setLayoutBoundsPosition(0, 0);
if (tabBar.includeInLayout)
tabBarHeight = Math.min(tabBar.getPreferredBoundsHeight(), unscaledHeight);
tabBar.setLayoutBoundsSize(unscaledWidth, tabBarHeight);
tabBar.setLayoutBoundsPosition(0,0);
tabBarHeight = tabBar.getLayoutBoundsHeight();
// backgroundAlpha is not a declared style on ButtonBar
// TabbedViewNavigatorButtonBarSkin implements for overlay support
var backgroundAlpha:Number = (_isOverlay) ? 0.75 : 1;
tabBar.setStyle(&backgroundAlpha&, backgroundAlpha);
if (contentGroup.includeInLayout)
var contentGroupHeight:Number = (_isOverlay) ? unscaledHeight : Math.max(unscaledHeight - tabBarHeight, 0);
contentGroup.setLayoutBoundsSize(unscaledWidth, contentGroupHeight);
contentGroup.setLayoutBoundsPosition(0, 0);
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:246490次
积分:2717
积分:2717
排名:第6754名
原创:38篇
转载:90篇
评论:33条
(1)(2)(2)(1)(3)(2)(7)(2)(9)(6)(6)(1)(1)(4)(2)(10)(3)(1)(9)(1)(1)(1)(12)(1)(5)(1)(7)(1)(12)(16)(2)(1)}

我要回帖

更多关于 hold是什么意思 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信