Tabbed Application
The final option for application type is the Tabbed Application.
Selecting Tabbed Application (see Figure 2-1) when
creating a new Flex Mobile project will prompt Flash Builder to provide
some additional functionality. As you can see within Figure 2-8, choosing Tabbed Application
allows you to define your tabs right within the New Flex Mobile Project
interface. In this example, I have added “My Application” and “My
Preferences” tabs. After clicking Finish, Flash Builder will create my new
Tabbed Application, as well as views for the tabs I defined. The code
example below shows the contents of my main application file, named
Tabbed.mxml. It is important to note
that each of the views I defined (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 within the View-Based Application we
previously discussed. Figure 2-9 shows the
running Tabbed Application. Figure 2-10 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"/> ...
Get Developing Android Applications with Flex 4.5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.