1 Reply Latest reply on Nov 7, 2011 11:35 AM by chiedozi

    Add a compnent to an action bar on flex 4.5 mobile

    mikmiki Level 1

      i'm trying to find a way to add a compoenent that will be visible on all tabs (TabbedViewApplication) on flex 4.5 mobile.

      the control needs to be under the action bar and in the width of all the action bar. all the samples i've seen are samples to add controls (buttons and so on) to a specific range in the action bar (title,action...) and not to all the action bar and below the action\title\navigation regions.

      any idea?

        • 1. Re: Add a compnent to an action bar on flex 4.5 mobile
          chiedozi

          There is no straight forward way of doing this as each ViewNavigator owns its own ActionBar.  You can use default properties on ViewNavigator to somewhat immitate this like so:

           

          <s:TabbedViewNavigatorApplication>

           

               <s:ViewNavigator label="Tab 1">

                    <s:actionContent>

                         <MyComponent />

                    </s:actionContent>

               </s:ViewNavigator>

           

               <s:ViewNavigator label="Tab 2">

                    <s:actionContent>

                         <MyComponent />

                    </s:actionContent>

               </s:ViewNavigator>

           

          </s:TabbedViewNavigatorApplication>

           

          This will result in a different component for each tab, but will prevent you from having to set the component on each individual View.  If you wanted to have one component visible for the entirety of the app, you could reskin the Application or ActionBar and add this component.

           

          Chiedo