The final option for application type is the Tabbed Application.
Selecting Tabbed Application when
creating a new Flex Mobile project will trigger Flash Builder to provide
some additional functionality. As you can see in Figure 1, changing to Tabbed
Application allows you to define your tabs within the new Flex Mobile
project interface. In this example, I have added a My Application tab and
a My Preferences tab. After clicking Finish, Flash Builder will create my
new Tabbed Application, as well as the tabs I defined as views. The next
code example shows the contents of my main application file named
Tabbed.mxml. It is important to note
that each of the views I defined as My Application and My Preferences are
included as ViewNavigator objects. This means that they
will have their own navigator objects and can include their own
independent navigation, just as we had within the View-Based Applications
we previously discussed. Figure 2 shows
the running Tabbed application. Figure 3 shows the View-Based
Application views we previously created within the My Application tab of
the Tabbed application.<?xml version="1.0" encoding="utf-8"?>
<s:TabbedViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<s:ViewNavigator label="My Application" width="100%" height="100%"
firstView="views._MyApplicationView"/>
<s:ViewNavigator label="My Preferences" width="100%" height="100%"
firstView="views._MyPreferencesView"/>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
</s:TabbedViewNavigatorApplication>