1 Reply Latest reply on Jun 29, 2011 11:31 PM by See4th

    Multiple View Pages -- each with different TabBar elements -- and the Back button (on Android)

    acjackson_ceo

      Good morning, All!

       

      I'm building a mobile application that has multiple View pages; some consisting of their own TabbedViewNavigator elements:

      Example:

       

      -LoginView

      -PageOneView (with 3 tab elements in its own TabBar interface)

      • Page1.1View
      • Page1.2View
      • Page1.3View

      -PageTwoView (with 4 tab elements in its own TabBar interface)

      • Page2.1View
      • Page2.2View
        • 2.2aView (a sub-View page of Page2.2View; another View component)
        • 2.2bView (a sub-View page of Page2.2View; another View component)
        • 2.2cView (a sub-View page of Page2.2View; another View component)
      • Page2.3View
      • Page2.4View

      -AnotherPageView

       

      Sidenote: I'm accessing each "main" page using the viewMenuItem component:

       

      <s:viewMenuItems>

       

      <s:ViewMenuItem label="PageOneView" click="PageOneView_clickHandler(event)"/>

       

      <s:ViewMenuItem label="PageTwoView" click="PageTwoView_clickHandler(event)"/>

       

      <s:ViewMenuItem label="AnotherPageView" click="AnotherPageView_clickHandler(event)"/>

       

      </s:viewMenuItems>

       

       

      Now, it's very much possible to achieve this effect (I will post the code upon request, if need be), but the issue I'm having involves the use of the Back button on my Android device.

       

      After I navigate to another "main" page view (let's say, from PageOneView to PageTwoView), when I press the Back button on my Android phone, it returns to the previous "main" page view (PageOneView), which is expected.

       

      However, let's say I navigate to PageTwoView, and under the Page2.2View Tab, I navigate to 2.2aView --> 2.2bView --> 2.2cView.  When I press my Back button, the effect that I WANT is: 2.2cView --> 2.2bView --> 2.2aView --> Page2.2View --> PageOneView (let's say Page1.1View).

       

      Instead, the effect I get is: 2.2cView --> PageOneView (skipping all other views I navigated to).

       

      I understand the "back history" structure of both ViewNavigatorApplication and TabbedViewNavigatorApplication, but is there a way to programatically override the current structure in order to achieve this effect?