Adobe
Products

Top destinations

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • SiteCatalyst
  • Students
  • Elements family

Adobe Creative Cloud

  • What is Adobe Creative Cloud?
  • Design
  • Web
  • Photography
  • Video
  • Students
  • Teams
  • Enterprise
  • Educational institutions

Design and photography

  • Photoshop
  • Illustrator
  • InDesign
  • Adobe Muse
  • Lightroom

Video

  • Adobe Premiere
  • After Effects

Web development and HTML5

  • Edge Tools & Services [opens in a new window]
  • Dreamweaver
  • Gaming [opens in a new window]

Adobe Marketing Cloud

  • What is Adobe Marketing Cloud?
  • Digital analytics
  • Social marketing
  • Web experience management
  • Testing and targeting
  • Media optimization

Analytics

  • SiteCatalyst
  • Adobe Discover
  • Insight

Social

  • Adobe Social

Experience Manager

  • CQ
  • Scene7

Target

  • Test&Target
  • Recommendations
  • Search&Promote

Media Optimizer

  • AdLens
  • AudienceManager
  • AudienceResearch

Document services

  • Acrobat
  • EchoSign [opens in a new window]
  • FormsCentral [opens in a new window]
  • SendNow [opens in a new window]
  • Acrobat.com [opens in a new window]

Publishing

  • Digital Publishing Suite

  • See all products
Business solutions

By business need

  • Digital analytics
  • Digital publishing
  • Document management
  • Media optimization
  • Social marketing
  • Testing and targeting
  • Video editing and serving
  • Web development [opens in a new window]
  • Web experience management
  • See all business needs

By industry

  • Broadcast
  • Education
  • Financial services
  • Government
  • Publishing
  • Retail
  • See all industries
Support & Learning

I need help

  • Products
  • Adobe Creative Cloud
  • Adobe Marketing Cloud
  • Forums [opens in a new window]

I want to learn

  • Training and tutorials
  • Certification [opens in a new window]
  • Adobe Developer Connection
  • Adobe Design Center
  • Adobe TV [opens in a new window]
  • Adobe Marketing Center
  • Adobe Labs [opens in a new window]
Download
  • Product trials
  • Adobe Flash Player
  • Adobe Reader
  • Adobe AIR
  • See all downloads
Company
  • Careers at Adobe
  • Investor Relations
  • Newsroom
  • Privacy
  • Corporate Social Responsibility
  • Customer Showcase
  • Contact us
  • More company info
Buy
  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers
  • Adobe Marketing Cloud sales [opens in a new window]
Search
 
Info Sign in
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Welcome,
My Adobe
My orders
My information
My preferences
My products and services
Sign out
My cart
Privacy My Adobe
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out Privacy My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Promotions
Estimated shipping
Tax
Calculated at checkout
Total
Review and Checkout
Adobe Developer Connection / Flex Developer Center /

Introducing Adobe Flex 4.6 SDK

by Jacob Surber

Jacob Surber
  • Adobe

Content

  • New Spark mobile components in Flex 4.6
  • SDK enhancements in Flex 4.6
  • Where to go from here

Created

30 November 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
componentsFlexmobileSpark
Was this helpful?
Yes   No

By clicking Submit, you accept the Adobe Terms of Use.

 
Thanks for your feedback.

The Flex 4.6 release builds on the mobile capabilities introduced in Flex 4.5, enabling you to:

  • Create tablet apps with multiple views and adaptive layouts.
  • Use new tablet focused UI components, including Callout, SpinnerList, and ToggleButton controls.
  • Add text inputs with OS-specific interfaces and interactions to your apps.
  • Leveraging these new capabilities, you can create tablet-optimized applications that target the latest devices, including the Apple iPad, the vast array of Google Android tablets, and the BlackBerry PlayBook.

This article introduces the new components and capabilities added to Flex 4.6 SDK.

New Spark mobile components in Flex 4.6

Flex 4.6 includes several new Spark mobile components.

SplitViewNavigator

The SplitViewNavigator is a new root level component that manages multiple ViewNavigator components. The ViewNavigator component, introduced in Flex 4.5, provides a stack-based mechanism to handle transitions, history, and memory management of Views. One of the most common uses of SplitViewNavigator is in the creation of a design pattern known as Master/Detail. Figure 1 shows an example of an application making use of the SplitViewNavigator. Queue Manager, an application built by Jonathan Campos of UnitedMindset and currently available on both iPad and Android tablets, shows how the Master/Detail design pattern can be used in tablet applications.

Figure 1. The Queue Manager app, illustrating the Master-Detail design pattern.
Figure 1. The Queue Manager app, illustrating the Master-Detail design pattern.

The left side of the application, or Master, is the View focused on navigation. The right side of the application, or Detail, displays the corresponding content. This powerful component can manage two or more ViewNavigator components at a time, and enables you to target and push views to any one of them.

Callout and CalloutButton

Callout is a component that you will find many use cases for on tablet devices. The component extends SkinnablePopUpContainer and inherits all of its functionality, but provides a relatively positioned arrow (see Figure 2).

Figure 2. A basic Callout.
Figure 2. A basic Callout.

This fully skinnable component can contain any kind of content, from a group of components to entire Views.

There is a tremendous amount of logic built into this simple looking component. While you have the option to explicitly choose the direction of the arrow and set the height, width, and position of the callout relative to its parent, all of these options can be automatically determined for you based on the component's contents and its parent's position on screen.

Extending Callout and adding functionality, CalloutButton provides similar capabilities to what you might see as dropdowns on tablet platforms today. Functionality like hiding and showing the Callout is wrapped into this straightforward class. Tapping the CalloutButton will display the Callout and its CalloutContents. Touching anywhere outside the Callout will fade it out and remove it. This behavior and appearance can all be modified by changing the CalloutSkin.

Using Callout and SplitViewNavigator together

One of the major conveniences of SplitViewNavigator is the ability to display the first navigator, most typically the Master view, in a Callout upon device reorientation (see Figure 3).

Figure 3. A CallOut in Queue Manager.
Figure 3. A CallOut in Queue Manager.

By simply setting autoHideFirstViewNavigator to true , the Master view is automatically hidden when the device is in portrait mode. If you define states for landscape and portrait and add a button to the Detail view's navigationContent that calls showFirstViewNavigatorInPopUp on click, your master view will be shown in a Callout. Below is a short example:

<s:SplitViewNavigator id="splitNavigator" autoHideFirstViewNavigator="true"> <s:ViewNavigator width="400" height="100%" firstView="views.MasterView" /> <s:ViewNavigator width="100%" height="100%" firstView="views.DetailView"> <s:navigationContent.portrait> <s:Button id="calloutButton" label="Navigation" click="splitNavigator.showFirstViewNavigatorInPopUp(calloutButton)" /> </s:navigationContent.portrait> </s:ViewNavigator> </s:SplitViewNavigator>

SpinnerList

The SpinnerList component is an entirely new take on List (see Figure 4), and it is optimized for mobile interactions.

Figure 4. The SpinnerList component.
Figure 4. The SpinnerList component.

The first thing you will notice is an updated visual appearance and a change in how selection is managed. Unlike the Spark List, SpinnerList manages selection based on position. SpinnerList also offers a unique Boolean property, wrapElements . When set to true (the default), the SpinnerList will wrap the elements in the list around the spinner in an uninterrupted loop. SpinnerList comes with a companion component called SpinnerListContainer. The SpinnerListContainer component not only holds single or multiple SpinnerList components, but its skin also provides the border, gradient appearance, and selection bar.

DateSpinner

The DateSpinner control extends SpinnerList and uses SpinnerListContainer to provide an extremely useful and versatile date component (see Figure 5). DateSpinner offer three modes of displaying information:

  • DateSelectorDisplayMode.DATE
  • DateSelectorDisplayMode.TIME
  • DateSelectorDisplayMode.DATE_AND_TIME
Figure 5. The DateSpinner control.
Figure 5. The DateSpinner control.

These modes can not only be used to display current date and time information, but also provide an intuitive method of selecting dates and times. DateSpinner is also fully localizable. By simply changing the locale property on the component, the display language be changed, along with the format in which the date is displayed.

ToggleButton

On the surface, the straightforward ToggleButton component enables users to slide a switch from left to right to make a simple choice. Under the hood, the Flex Spark skinning architecture lets you customize this control to display customizable text, display images, or even change its behavior.

SDK enhancements in Flex 4.6

Complementing the new user interface components, Flex 4.6 has several SDK enhancements.

StageText

You may have used the <InputText> and <TextArea> components in previous Flex mobile applications. When compiled with Flex 4.6, these components will now leverage StageText. StageText is a joint effort between the AIR and Flex teams to enable text editing in your application to use the device's native text editing controls. This means your user will see the usual editing UI and have the expected experience no matter what OS version or platform your application is running on. StageText provides this native editing experience by punching through to the OS and exposing these controls. As a result, these text fields do not reside on the display list. 

Dynamic splash screens

With the ever-growing number of devices and form factors, the implementation of SplashScreen in Flex 4.5 was simply not going to scale. We went back to the drawing board and created SplashScreenImage. SplashScreenImage was specifically designed to let you specify different splash screens based on the device and orientation. To create this new dynamic splash screen, create a new MXML file based on SplashScreenImage, and then add multiple instances of SplashScreenImageSource that define what asset to display based on DPI or screen resolution. For example:

<s:SplashScreenImage xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"> <!-- 160dpi phone --> <s:SplashScreenImageSource dpi="160" source="@Embed('assets/image-phone.png')" /> <!-- 240 & 320 dpi phone share the same image --> <s:SplashScreenImageSource dpi="240" source="@Embed('assets/image-phone960.png')" /> <s:SplashScreenImageSource dpi="320" source="@Embed('assets/image-phone960.png')" /> <!-- Tablets all share the same image --> <s:SplashScreenImageSource minResolution="960" source="@Embed('assets/image-tablet.png')" /> </s:SplashScreenImage>

After your SplashScreenImage has been created, simply assign the class instance to the splashScreenImage property in your main application tag. Upon launching your app on a device, the splash screen will display with the correct image size and DPI; it will even auto-rotate to show the correct image based on the orientation of your device.

Scroller

Several under-the-hood enhancements have been made to Scroller. First and foremost, scroll bars are now created on demand. This means your application does not spend time up-front creating scrollbars for content until the content is scrolled, resulting in a view creation performance boost.

Two new properties have also been added: pageScrollingEnabled and scrollSnappingMode . When pageScrollingEnabled is set to true the scroller will advance by the size of the current viewport. Additional conveniences are built in such that if the scroll velocity is not high enough or you do not scroll the content at least 50% of the way, the content will snap back to its original location. The scrollSnappingMode property lets you further tune your scrolling interaction by allowing you to control the ending scroll position. With options like leadingEdge , trailingEdge , and center , you can make sure your list lands in the appropriate place after a throw.

16-bit and 32-bit render modes

When creating a new mobile project with Flex 4.6, a new Android-specific flag has been created in app.xml named <colorDepth> . By default when Flash Builder creates a new Flex mobile project, it sets this value to "16bit" . You have the option to change this value to "32bit" . There are pros and cons to both options. The 16-bit mode is optimized for performance and other general use cases. The 32-bit mode offers specific features that your app may require, such as StageVideo, Stage3D support, and superior rendering of gradients. Make sure to evaluate the requirements of your entire app before making the switch to 32-bit rendering on Android.

Where to go from here

This article provided an overview of some of the new capabilities in Flex 4.6 SDK. For more information please refer to the Flex SDK documentation. To learn more about Adobe's mobile development tooling see Adam Lehman's article What's new in Flash Builder 4.6.


This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 Unported License.

More Like This

  • Flex mobile skins – Part 1: Optimized skinning basics
  • Build your first mobile Flex application – Twitter Trends
  • Mobile development using Adobe Flex 4.5 SDK and Flash Builder 4.5
  • Layout mirroring with Flex
  • Using Flash Builder 4 to create Spark item renderers
  • Building an icon-checkbox component with Flex 3
  • A Flex 3 developer's introduction to Flex 4.5 and Flash Builder 4.5
  • Sending and receiving mobile text messages with Flex, ColdFusion, and BlazeDS
  • Flex mobile development tips and tricks – Part 1: Data handling
  • What's new in Flex 4.6 SDK and Flash Builder 4.6

Tutorials & Samples

Tutorials

  • Flex mobile performance checklist
  • Flex and Maven with Flexmojos – Part 3: Journeyman
  • Migrating Flex 3 applications to Flex 4.5 – Part 4

Samples

  • Twitter Trends
  • Flex 4.5 reference applications
  • Mobile Trader Flex app on Android Market

Products

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • Digital Publishing Suite
  • Elements family
  • SiteCatalyst
  • For education

Download

  • Product trials
  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR

Support & Learning

  • Product help
  • Forums

Buy

  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2013 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

Ad Choices

Reviewed by TRUSTe: site privacy statement