2 Replies Latest reply on Jul 16, 2012 6:53 AM by s22b22

    SplitViewNavigator without autoHideFirstNavigator=true issues

    Prem Radhakrishnan Level 1

      I am trying to use the SplitViewNavigator without the autoHideFirstNavigator. I want to do it programmatically so I can have user interaction to hide it and display the button for the callout or on orientation change.

      So that works great, I do

      var svn:SplitViewNavigator = FlexGlobals.topLevelApplication.mainSvn as SplitViewNavigator;

                                              svn.getViewNavigatorAt(0).visible = false;

       

       

      and I can call showFirstViewNavigatorInPopup() to display the popup

       

       

      The problem is if I want to restore it

       

       

      If I do

       

       

      var svn:SplitViewNavigator = FlexGlobals.topLevelApplication.mainSvn as SplitViewNavigator;

                                    svn.hideViewNavigatorPopUp();

                                    svn.getViewNavigatorAt(0).visible = true;

       

       

      Nothing happens , the first pane is not restored !!! Any ideas as to what I am doing wrong ? According to the documentation it says "After closing the popup, the navigator that was shown remains invisible unless autoHideFirstViewNavigator is true and the device orientation is landscape. In all other cases, the visibility of the first navigator needs to be set to true to make it visible again."

        • 1. Re: SplitViewNavigator without autoHideFirstNavigator=true issues
          Prem Radhakrishnan Level 1

          I have found no resolution to this ! Anyone from Adobe please help ?

          Thanks

          • 2. Re: SplitViewNavigator without autoHideFirstNavigator=true issues
            s22b22

            Hi,

             

            Did you succeed ?

            There is three ways to solve your problem.

             

             

            First one : the user can act on the visibility when he wants

             

            Affect a min and a max widthes to the 'mobile' wiew

            this widthes can be absolute or relative

            the min width must not be 0,

            20 is a good value to allow the user to rollOver

             

             

            Add events listeners,  rollOver and rollOut

            on roll over affect max, on rollout affect min width

            a tip : when you change the width of the smallest view, (ie the mobile wiew), you'll have to force the other one to 100 %, to force refresh

             

            Second one : you programaticly acts

             

            Dont use visibility, use width

            smaller.width = 0;

            other.percentWidth = 100;

             

            third way : You offer the user a Slider,

            this slider is in the mobile view

            this slider is declared as is

            liveDragging="true"

            maximum="40"

            minimum="20"

            value="40"

             

            and on changeEvent

             




               var splitNavigator:SplitViewNavigator = navigator.parentNavigator as SplitViewNavigator;  



               var listeVw:ViewNavigator = splitNavigator.getViewNavigatorAt(0) as ViewNavigator;        



               listeVw.percentWidth = slid.value;   



               var detailVw:ViewNavigator = splitNavigator.getViewNavigatorAt(1) as ViewNavigator;        



               detailVw.percentWidth = 100;"

             

            in this example

            - listeVw is the small, mobile view

            - detailVw the bigger one

             

            Be sure that  autoHideFirstViewNavigator="false"

            It works fine, on both of the orientations of the device (tested only with iPad yet)

             

             

            Hoping it's helpfull

            Tell me back : if you're still unsuccessfull, i'll send you a small project

             

            Serge Boujo