Mobile ActionBar - Functional and Design SpecificationMobile ActionBar - Functional and Design Specification | Glossary | Summary and Background | Usage Scenarios | Detailed Description | API Description | B Features | Examples and Usage | Additional Implementation Details | Compiler Work | Backwards Compatibility | Accessibility | Performance | Globalization | Localization | Cross-Platform Considerations | Issues and Recommendations
GlossaryViewNavigator - Like the Flex ViewStack navigation container, ViewNavigator is a new navigator container which consists of a collection of child sections (a Vector of Views) stacked on top of each other, where only one section at a time is visible. Summary and BackgroundActionBar is a SkinnableComponent used to support ViewNavigator. ActionBar provides discrete navigation, title and action content groups that are managed by ViewNavigator. ViewNavigator derives this content from the currently active View or from ViewNavigator's own default content. Customization is provided in 2 ways:
Usage ScenariosJohn is creating a document editor. Instead of using the OptionsMenu to provide actions for the screen, he uses the actionContent property of his View to add Save and Undo actions to the ActionBar. Ryan is a designer who wants to create a branded experience for his application. He creates a custom skin for ActionBar that includes a logo Image that provides "Home" navigation. He also uses CSS to specify a flat-styled look to ActionBar Buttons. Builder - Design ViewSee Flex Mobile Design View (TBD) spec. Ryan wants to use Design View to add a back button to simulate the iOS look and feel. He drags a new Button component from the Components panel near the left-hand side of the ActionBar. Design View highlights the area for insertion. When Ryan drops the button over the left side of the ActionBar, the s:navigationContent template property is inserted in to MXML along with a new s:Button. CatalystWork with your Catalyst contacts to complete a workflow specification that describes how this feature will be exposed to users in Catalyst. Include a link to this document here. Detailed DescriptionClass DescriptionsThe ActionBar feature includes the following classes:
ActionBar Skin Parts
Usage of template properties for ActionBar contentThere are 6 total template properties for ActionBar:
Template properties for navigationContent, titleContent and actionContent are null by default. Layout properties for each content area are defined by the skin. The default layout is a HorizontalLayout with zero padding. Title GroupIf titleContent is not null, it's visual elements replace the mxmlContent of titleGroup. If titleContent is null, ActionBar inserts the titleDisplay, if present, as the only mxmlContent of titleGroup. For example, the default skin specifies a titleDisplay TextField. A developer may choose to have a View that replaces the title with an Image. The Image replaces the TextFieldand ActionBar no longer displays the View's title property. When navigating to a new View that does not specify titleContent, the titleDisplay TextField is restored and the new View's title is displayed. Action GroupactionContent is a proxy for the mxmlContent of actionGroup. Unlike titleGroup, it has no special rules for null content. Navigation GroupnavigationContent is a proxy for the mxmlContent of navigationGroup. Unlike titleGroup, it has no special rules for null content. Interaction between ActionBar and View and ViewNavigatorBoth View and ViewNavigator define proxies for the 6 template properties of ActionBar. When ViewNavigator adds a new View, it checks for these properties and pushes the content to ActionBar. If the active View does not define it's own content, ViewNavigator updates the ActionBar with it's values for these properties. This allows developers to define default content such as a consistent Home button in the navigationContent. Properties of ActionBar are driven by ViewNavigator as listed below:
ViewNavigator manages the ActionBar content as navigation events occur. ViewNavigator listens for property changes when a View becomes activated in order to push updated content to the ActionBar without navigation occurring. When the View is deactivated, ViewNavigator removes it's listeners from the View and listens to the new active View.
Interaction between ActionBar and MobileApplicationMobileApplication also defines proxies for the 6 template properties of ActionBar. These properties offer a declarative way set these default values on ViewNavigator. ViewNavigator TransitionsTransitions are specified by the View Transitions and Frame-Based Animation (TBD) spec. ActionBar does not provide a mechanism for internal content transitions. SlideViewTransition defines behavior that requires knowledge of and access to ActionBar skin parts. In particular, SlideViewTransition will detect when content areas of ActionBar can remain static or should be animated in-sync with the View. See the view transitions spec for more details. API DescriptionActionBar.as
package spark.components
{
[Style(name="chromeColor", type="uint", format="Color", inherit="no", theme="spark")]
/**
* The alpha of the background chrome for this component.
*/
[Style(name="backgroundAlpha", type="Number", inherit="yes", theme="spark", minValue="0.0", maxValue="1.0")]
/**
*
*/
public class ActionBar extends SkinnableComponent
{
public function ActionBar()
[SkinPart(required="false")]
public var titleDisplay:TextField; /* Final text component TBD */
[SkinPart(required="false")]
public var navigationGroup:Group;
[SkinPart(required="false")]
public var titleGroup:Group;
[SkinPart(required="false")]
public var actionGroup:Group;
/**
* Title to display.
*/
public function get title():String
public function set title(value:String):void
[ArrayElementType("mx.core.IVisualElement")]
/**
* The set of components to include in the titleGroup of the
* ActionBar. If titleContent is not null, it's visual elements replace the
* mxmlContent of titleGroup. If titleContent is null, the
* titleDisplay skin part, if present, replaces the mxmlContent of titleGroup.
* The location and appearance of the titleGroup of the ActionBar container
* is determined by the spark.skins.mobile.ActionBarSkin class.
* By default, the ActionBarSkin class defines the titleGroup to appear in the center
* of the ActionBar.
* Create a custom skin to change the default location and appearance of the titleGroup.
*
* @default null
*/
public function get titleContent():Array
public function set titleContent(value:Array):void
/**
* Defines the layout of the titleGroup.
*
* @default HorizontalLayout
*/
public function get titleLayout():LayoutBase
public function set titleLayout(value:LayoutBase):void
[ArrayElementType("mx.core.IVisualElement")]
/**
* The set of components to include in the navigationGroup of the
* ActionBar.
* The location and appearance of the navigationGroup of the ActionBar container
* is determined by the spark.skins.mobile.ActionBarSkin class.
* By default, the ActionBarSkin class defines the navigationGroup to appear to the left
* of the title display area of the ActionBar.
* Create a custom skin to change the default location and appearance of the navigationGroup.
*
* @default null
*/
public function get navigationContent():Array
public function set navigationContent(value:Array):void
/**
* Defines the layout of the navigationGroup.
*
* @default HorizontalLayout
*/
public function get navigationLayout():LayoutBase
public function set navigationLayout(value:LayoutBase):void
[ArrayElementType("mx.core.IVisualElement")]
/**
* The set of components to include in the actionGroup of the
* ActionBar.
* The location and appearance of the actionGroup of the ActionBar container
* is determined by the spark.skins.mobile.ActionBarSkin class.
* By default, the ActionBarSkin class defines the actionGroup to appear to the right
* of the title display area of the ActionBar.
* Create a custom skin to change the default location and appearance of the actionGroup.
*
* @default null
*/
public function get actionContent():Array
public function set actionContent(value:Array):void
/**
* Defines the layout of the action area.
*
* @default HorizontalLayout
*/
public function get actionLayout():LayoutBase
public function set actionLayout(value:LayoutBase):void
}
}
B FeaturesNone Examples and Usage
ActionBarExample.mxml <?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:ns="*" title="Edit Description"> <s:actionContent> <s:Button icon="@Embed(source='undo.fxg')"/> <s:Button icon="@Embed(source='redo.fxg')"/> </s:actionContent> <s:TextArea width="100%" height="100%"/> </s:View>
ActionBarExample.mxml <?xml version="1.0" encoding="utf-8"?> <s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.HomeView"> <s:navigationContent> <s:Button icon="@Embed(source='home.fxg')" click="navigator.popToFirstView()"/> </s:navigationContent> </s:ViewNavigatorApplication>
ActionBarExample.mxml <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"> <s:ActionBar left="0" right="0" top="0"> <s:navigationContent> <s:Image source="@Embed(source='logo.fxg')"/> </s:navigationContent> <s:titleContent> <s:TextInput text="Find in Page"/> </s:titleContent> <s:actionContent> <s:Button label="Find"/> <s:Button label="Next"/> <s:Button label="Previous"/> </s:actionContent> </s:ActionBar> </s:Application> Additional Implementation DetailsEnter implementation/design details for the feature here. This section may be updated after the spec signs off. Compiler WorkWill this feature require any compiler changes? If so, describe here, if not already included in the Detailed Description.
Backwards CompatibilitySyntax changesNone BehaviorNone Warnings/DeprecationNone AccessibilityTODO PerformanceNone GlobalizationTODO LocalizationCompiler FeaturesNone Framework FeaturesList the RTE message strings that will require localization. (They must all come from .properties files.) List all UI text that will require localization, such as the month and day names in a DateChooser. (All such text must all come from .properties files.) List all UI images, skins, sounds, etc. that will require localization. Discuss any locale-specific formatting requirements for numbers, dates, currency, etc. Discuss any locale-specific sorting requirements. Cross-Platform ConsiderationsTabletGiven the larger screen sizes of tablets, we anticipate that applications will have multiple ViewNavigators displayed simultaneously, each with their own ActionBar. There are no known limitations for ActionBar for the current implementation. Issues and RecommendationsOpen IssuesResolved Issues |
|
| You must be logged in to comment. |
|---|


