You are here: Android Specific Behavior

App Menu Widget

The App Menu is a bar that you can define at the bottom of an app. The App Menu contains icons for features that are applicable for the entire application rather than just a specific page in the app. Examples of an Application Menu includes the bar that you see in a banking application or in a news application.

The AppMenu widget capabilities can be broadly categorized into the following:

UI Appearance

 
PropertiesDescription
Focus Skin Specifies the look and feel when there is focus on the App Menu.
Skin Specifies the look and feel of the App Menu.
 

Data Management

MethodsDescription
addAppMenuItemAt Adds an App Menu item at the given index.
createAppMenu Allows you to create App Menu dynamically through code.
getAppMenuBadgeValueEnables you to read the badge value (if any) attached to the given Appmenu item.
getCurrentAppMenu Returns the unique identifier of the current app menu that is set through setCurrentAppMenu.
removeAppMenuItemAt Removes the specified App Menu item.
setAppMenuBadgeValue Allows you to set a badge value to the given app menu item at the upper, right corner of the menu item.
setAppMenuFocusByID Takes ID (which is set using createAppMenu) instead of index and sets the focus on the menu item of the current app menu.
setCurrentAppMenu Uses the unique identifier which represents the App Menu and sets it as current app menu.
  

Internationalization

PropertiesDescription
i18n Key Specifies the i18n Key to be used for internationalization.

 

3D Touch

MethodsDescription
registerForPeekandPop Registers a widget to enable 3D Touch peek and pop gestures.
setOnPeek Sets and overrides the existing onPeekCallback for the widget.
setOnPop Overrides the existing onPopCallback for the widget.
unregisterForPeekandPop Unregisters a widget from 3D Touch peek and pop gestures.

User Input Handling

MethodsDescription
addGestureRecognizerAllows you to set a gesture recognizer for a specified gesture for a specified widget.
removeGestureRecognizer Allows you to remove the specified gesture recognizer for the specified widget.
setGestureRecognizerAllows you to set a gesture recognizer for a specified gesture for a specified widget.
 

Animations

MethodsDescription
AnimateApplies an animation to the widget.

 

Miscellaneous

MethodsDescription
getBadge Enables you to read the badge value (if any) attached to the specified widget.
setBadge Enables you to set the badge value to the given widget at the upper, right corner of the widget.
 
PropertiesDescription
Appbar Button Style Specifies the button style for application bar.
Event Specifies the event for the App Menu item.
Icon Specifies the image to be displayed for the App Menu item.
Position

Specifies the position of the button for application bar.

Render Specifies if the widget code must be included in the platform when the code is generated.
Title Specifies a general or descriptive text for App Menu.

 

Enabling RTL

PropertiesDescription
retainContentAlignmentHelps to retain the content alignment of the widget while applying RTL.
retainFlexPositionPropertiesHelps to retain the left, right and padding properties while applying RTL.
retainFlowHorizontalAlignmentEnables you to change the horizontal flow of the widget from left to right.

Configurations common to all widgets

MethodsDescription
convertPointFromWidget Allows you to convert the coordinate system from a widget to a point (receiver's coordinate system).
convertPointToWidgetAllows you to convert the coordinate system from a a point (receiver's coordinate system) to a widget.
removeFromParent Allows you to remove a child widget from a parent widget.
setEnabled Specifies the widget that must be enabled or disabled.
setFocus Specifies the widget on which there must be focus.
setVisibility Use this method to set the visibility of the widget.
 
PropertiesDescription
ID A unique identifier of App Menu consisting of alpha numeric characters.

 

AppMenu Widget Basics

Android Specific Behavior

iOS Specific Behavior

Windows 7 Specific Behavior

premCopyright © 2012 Kony, Inc. All rights reserved.
premCopyright © 2012 Kony, Inc. All rights reserved.