Skip navigation
Currently Being Moderated

ViewMenuItem do not appear when applying custom skin on ViewNavigatorApplication

May 1, 2013 10:37 AM

Tags: #flex-mobile #flex-4.6 #mxml #viewmenuitems

ViewMenuItems works fine when I don't apply skinClass fo ViewNavigatorApplication, but when I apply custom skin to ViewNavigator, ViewMenuItems doesn't appear.

Here is my 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 for 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 Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points