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
trigger Flash Builder to provide some additional functionality. As you can
see within Figure 2-8, changing to
Tabbed Application allows you to define your tabs right 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 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 we had within the
view-based applications 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 iOS 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.