ViewMenuItem do not appear when applying custom skin on ViewNavigatorApplication
viewmenuitems works fine when don't apply skinclass fo viewnavigatorapplication, when apply custom skin viewnavigator, viewmenuitems doesn't appear.
here main file
<?xml version="1.0" encoding="utf-8"?>
<s:viewnavigatorapplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" firstview="views.drivesafehomeview" applicationdpi="160"
initialize="applyruntimestylesheet()" skinclass="skins.customapplicationskin" >
<fx:declarations>
<!-- place non-visual elements (e.g., services, value objects) here -->
</fx:declarations>
<fx:script>
<![cdata[
public function applyruntimestylesheet():void {
stylemanager.loadstyledeclarations("css/styles.swf")
// skinclass="skins.customapplicationskin"
}
]]>
</fx:script>
</s:viewnavigatorapplication>
code customapplicationskin.mxml is
<?xml version="1.0" encoding="utf-8"?>
<s:skin name="customapplicationskin"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
>
<fx:metadata>
<![cdata[
[hostcomponent("drivesafe")]
]]>
</fx:metadata>
<s:states>
<s:state name="normal" />
<s:state name="disabled" />
</s:states>
<s:bitmapimage width="100%" height="100%" source="@embed('/assets/background.jpg')"/>
<s:group id="contentgroup" width="100%" height="100%" minwidth="0" minheight="0" />
<s:viewnavigator id="navigator" width="100%" height="100%" />
</s:skin>
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment