Flash Builder ViewNavigator
Flash Builder and its Hero APIs provide functionality to handle view management.
Create a new project under File→New→Flex Mobile
project. On the Mobile Settings panel, choose Application
template→Mobile Application, then select
Finish. Look at the main default application file. A firstView
tag was added to the MobileApplication
tag. It points to an MXML
file inside a views directory:
<s:MobileApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adboec.com/flex/spark" firstView="views.OpeningView" } }
Notice a new directory called views inside your default application file. It contains the MXML file which was named after your project, as well as HomeView.mxml, and was given a title of HomeView. This is the default first view which appears when the application starts:
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adboec.com/flex/spark" title="HomeView"> <fx:Declarations> </fx:Declarations> </s:View>
Note
The concept of a splash screen, or a default.png file, does not exist in Android as it does in iOS. The user sees a black screen until the application is loaded. Flex provides an option to display an image first while it initializes the application to reduce the sense of delay. The image is automatically replaced by the default view when ready.
A few new components were created especially for
mobile development. The spark.
components.
ViewNavigatorApplication
container
automatically creates a View
Navigator
object. It ...
Get Developing Android Applications with Adobe AIR 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.