HorizontalImageStrip Properties
The basic properties for HorizontalImageStrip widget are:
accessibilityConfig Property
Enables you to control accessibility behavior and alternative text for the widget.
For more information on using accessibility features in your app, see the Accessibility appendix in the Volt MX IrisUser Guide.
Syntax
Type
Object
Read/Write
Read + Write
Remarks
- The accessibilityConfig property is enabled for all the widgets which are supported under the Flex Layout.
Note: From Volt MX Iris V9 SP2 GA version, you can provide i18n keys as values to all the attributes used inside the
accessibilityConfig
property. Values provided in the i18n keys take precedence over values provided ina11yLabel
,a11yValue
, anda11yHint
fields.
The accessibilityConfig property is a JavaScript object which can contain the following key-value pairs.
Key | Type | Description | ARIA Equivalent |
---|---|---|---|
a11yIndex | Integer with no floating or decimal number. | This is an optional parameter. Specifies the order in which the widgets are focused on a screen. | For all widgets, this parameter maps to the aria-index , index , or taborder properties. |
a11yLabel | String | This is an optional parameter. Specifies alternate text to identify the widget. Generally the label should be the text that is displayed on the screen. | For all widgets, this parameter maps to the aria-labelledby property of ARIA in HTML. > Note: For the Image widget, this parameter maps to the alt attribute of ARIA in HTML. |
a11yValue | String | This is an optional parameter. Specifies the descriptive text that explains the action associated with the widget. On the Android platform, the text specified for a11yValue is prefixed to the a11yHint. | This parameter is similar to the a11yLabel parameter. If the a11yValue is defined, the value of a11yValue is appended to the value of a11yLabel. These values are separated by a space. |
a11yHint | String | This is an optional parameter. Specifies the descriptive text that explains the action associated with the widget. On the Android platform, the text specified for a11yValue is prefixed to the a11yHint. | For all widgets, this parameter maps to the aria-describedby property of ARIA in HTML. |
a11yHidden | Boolean | This is an optional parameter. Specifies if the widget should be ignored by assistive technology. The default option is set to false. This option is supported on iOS 5.0 and above, Android 4.1 and above, and SPA | For all widgets, this parameter maps to the aria-hidden property of ARIA in HTML. |
a11yARIA | Object | This is an optional parameter. For each widget, the key and value provided in this object are added as the attribute and value of the HTML tags respectively. Any values provided for attributes such as aria-labelledby and aria-describedby using this attribute, takes precedence over values given in a11yLabel and a11yHint fields. When a widget is provided with the following key value pair or attribute using the a11yARIA object, the tabIndex of the widget is automatically appended as zero.{"role": "main"} aria-label |
This parameter is only available on the Desktop Web platform. |
Android limitations
- If the results of the concatenation of a11y fields result in an empty string, then
accessibilityConfig
is ignored and the text that is on widget is read out. - The soft keypad does not gain accessibility focus during the right/left swipe gesture when the keypad appears.
SPA/Desktop Web limitations
- When
accessibilityConfig
property is configured for any widget, thetabIndex
attribute is added automatically to theaccessibilityConfig
property. - The behavior of accessibility depends on the Web browser, Web browser version, Voice Over Assistant, and Voice Over Assistant version.
- Currently SPA/Desktop web applications support only a few ARIA tags. To achieve more accessibility features, use the attribute a11yARIA. The corresponding tags will be added to the DOM as per these configurations.
Example 1
This example uses the button widget, but the principle remains the same for all widgets that have an accessibilityConfig property.
Example 2
This example uses the button widget to implement internationalization in accessibilityConfig
property, but the principle remains the same for all widgets.
Platform Availability
- Available in the IDE
- iOS, Android, SPA, and Desktop Web
anchorPoint Property
Specifies the anchor point of the widget bounds rectangle using the widget’s coordinate space.
Syntax
Type
JSObject
Read/Write
Read + Write
Remarks
The value for this property is a JavaScript dictionary object with the keys “x” and “y”. The values for the “x” and “y” keys are floating-point numbers ranging from 0 to 1. All geometric manipulations to the widget occur about the specified point. For example, applying a rotation transform to a widget with the default anchor point causes the widget to rotate around its center.
The default value for this property is center ( {“x”:0.5, “y”:0.5} ), that represents the center of the widgets bounds rectangle. The behavior is undefined if the values are outside the range zero (0) to one (1).
Example
Platform Availability
- iOS, Android, Windows, and SPA
arrowConfig Property
Specifies the configurable arrow properties of the HorizontalImageStrip. This property is available only when showArrows is set to true.
Syntax
Type
JSObject
Read/Write
No
Remarks
The available options are:
- leftArrowImage:Accepts the image to be set as left arrow.
- leftArrowFocusImage:Accepts the image to be set as left arrow when in focus.
- rightArrowImage:Accepts the image to be set as right arrow.
- rightArrowFocusImage:Accepts the image to be set as right arrow when in focus.
Note: The options leftArrowFocusImage and rightArrowFocusImage are not supported in BlackBerry, Mobile Web, and SPA platforms.
Example
Platform Availability
Available in the IDE.
Available on all platforms.
data Property
Specifies the JSObject which represents the images to be rendered in horizontal image strip.
Data format of JavaScript object
Syntax
Type
Array
Read/Write
Yes - (Read and Write)
Remarks
Data format:An array with two elements.
- [0] is the array of objects with hashes.
- [1] is the image key’s key in the data hash of [0].
Example
Platform Availability
Available in the IDE.
Available on all platforms.
enableCache Property
The property enables you to improve the performance of Positional Dimension Animations.
Syntax
Type
Boolean
Read/Write
Read + Write
Remarks
The default value for this property is true.
Note: When the property is used, application consumes more memory. The usage of the property enables tradeoff between performance and visual quality of the content. Use the property cautiously.
Example
Platform Availability
- Available in the IDE.
- Windows
focusSkin Property
Specifies the look and feel of the widget when in focus.
Syntax
Type
String
Read/Write
Yes - (Read and Write)
Remarks
Note: You must be aware of the following:
1. On J2ME non-touch devices, if you do not specify the Focus skin, it is not possible to identify the focus change between the widgets.
2. Mobile Web does not support this property, instead browser specific focus will be applied.
Example
Platform Availability
Available in the IDE.
Available on all platforms. platforms.
hoverSkin Property
Specifies the look and feel of a widget when the cursor hovers on the widget.
Syntax
Type
String
Read/Write
Yes
Example
Platform Availability
Available in the IDE.
This property is available on Windows Tablet.
id Property
id is a unique identifier of HorizontalImageStrip consisting of alpha numeric characters. Every HorizontalImageStrip should have a unique id within a Form.
Syntax
Type
String - [Mandatory]
Read/Write
Yes - (Read only)
Example
Platform Availability
Available in the IDE.
Available on all platforms.
imageWhenFailed Property
Specifies the image to be displayed when the remote resource is not available. This image is taken from the resources folder.
Syntax
Type
String
Read/Write
No
Example
Platform Availability
Available in the IDE.
Available on all platforms. and Windows Desktop platforms.
imageWhileDownloading Property
Specifies the image to be displayed when the remote source is still being downloaded. This image is taken from the resources folder.
Syntax
Type
String
Read/Write
No
Example
Platform Availability
Available in the IDE.
Available on all platforms except Server side Mobile Web and Windows Desktop platforms.
info Property
A custom JSObject with the key value pairs that a developer can use to store the context with the widget. This will help in avoiding the globals to most part of the programming.
Info property can hold any JSObject. After assigning the JSObject to info property, the JSObject should not be modified. For example,
Syntax
Type
JSObject
Read/Write
Yes - (Read and Write)
Remarks
Note: This is a non-Constructor property. You cannot set this property through widget constructor. But you can read and write data to it.
Example
Platform Availability
Not available in the IDE.
Available on all platforms.
isVisible Property
This property controls the visibility of a widget on the form.
Syntax
Type
Boolean
Read/Write
Yes - (Read and Write)
Remarks
The default value for this property is true. If set to false, the widget is not displayed. If set to true, the widget is displayed.
Note: You can also set the visibility of a widget dynamically from code using the setVisibility method.
Example
Platform Availability
Available in the IDE.
Available on all platforms.
retainContentAlignment Property
This property is used to retain the content alignment property value, as it was defined.
Note: Locale-level configurations take priority when invalid values are given to this property, or if it is not defined.
The mirroring widget layout properties should be defined as follows.
The following table illustrates how widgets consider Local flag and Widget flag values.
Properties | Local Flag Value | Widget Flag Value | Action |
---|---|---|---|
Mirror/retain FlexPositionProperties | true | true | Use the designed layout from widget for all locales. Widget layout overrides everything else. |
Mirror/retain FlexPositionProperties | true | false | Use Mirror FlexPositionProperties since locale-level Mirror is true. |
Mirror/retain FlexPositionProperties | true | not specified | Use Mirror FlexPositionProperties since locale-level Mirror is true. |
Mirror/retain FlexPositionProperties | false | true | Use the designed layout from widget for all locales. Widget layout overrides everything else. |
Mirror/retain FlexPositionProperties | false | false | Use the Design/Model-specific default layout. |
Mirror/retain FlexPositionProperties | false | not specified | Use the Design/Model-specific default layout. |
Mirror/retain FlexPositionProperties | not specified | true | Use the designed layout from widget for all locales. Widget layout overrides everything else. |
Mirror/retain FlexPositionProperties | not specified | false | Use the Design/Model-specific default layout. |
Mirror/retain FlexPositionProperties | not specified | not specified | Use the Design/Model-specific default layout. |
Syntax
Type
Boolean
Read/Write
No (only during widget-construction time)
Example
Platform Availability
- Available in IDE
- Windows, iOS, Android, and SPA
retainFlexPositionProperties Property
This property is used to retain flex positional property values as they were defined. The flex positional properties are left, right, and padding.
Note: Locale-level configurations take priority when invalid values are given to this property, or if it is not defined.
The mirroring widget layout properties should be defined as follows.
The following table illustrates how widgets consider Local flag and Widget flag values.
Properties | Local Flag Value | Widget Flag Value | Action |
---|---|---|---|
Mirror/retain FlexPositionProperties | true | true | Use the designed layout from widget for all locales. Widget layout overrides everything else. |
Mirror/retain FlexPositionProperties | true | false | Use Mirror FlexPositionProperties since locale-level Mirror is true. |
Mirror/retain FlexPositionProperties | true | not specified | Use Mirror FlexPositionProperties since locale-level Mirror is true. |
Mirror/retain FlexPositionProperties | false | true | Use the designed layout from widget for all locales. Widget layout overrides everything else. |
Mirror/retain FlexPositionProperties | false | false | Use the Design/Model-specific default layout. |
Mirror/retain FlexPositionProperties | false | not specified | Use the Design/Model-specific default layout. |
Mirror/retain FlexPositionProperties | not specified | true | Use the designed layout from widget for all locales. Widget layout overrides everything else. |
Mirror/retain FlexPositionProperties | not specified | false | Use the Design/Model-specific default layout. |
Mirror/retain FlexPositionProperties | not specified | not specified | Use the Design/Model-specific default layout. |
Syntax
Type
Boolean
Read/Write
No (only during widget-construction time)
Example
Platform Availability
- Available in IDE
- Windows, iOS, Android, and SPA
retainFlowHorizontalAlignment Property
This property is used to convert Flow Horizontal Left to Flow Horizontal Right.
Note: Locale-level configurations take priority when invalid values are given to this property, or if it is not defined.
The mirroring widget layout properties should be defined as follows.
The following table illustrates how widgets consider Local flag and Widget flag values.
Properties | Local Flag Value | Widget Flag Value | Action |
---|---|---|---|
Mirror/retain FlexPositionProperties | true | true | Use the designed layout from widget for all locales. Widget layout overrides everything else. |
Mirror/retain FlexPositionProperties | true | false | Use Mirror FlexPositionProperties since locale-level Mirror is true. |
Mirror/retain FlexPositionProperties | true | not specified | Use Mirror FlexPositionProperties since locale-level Mirror is true. |
Mirror/retain FlexPositionProperties | false | true | Use the designed layout from widget for all locales. Widget layout overrides everything else. |
Mirror/retain FlexPositionProperties | false | false | Use the Design/Model-specific default layout. |
Mirror/retain FlexPositionProperties | false | not specified | Use the Design/Model-specific default layout. |
Mirror/retain FlexPositionProperties | not specified | true | Use the designed layout from widget for all locales. Widget layout overrides everything else. |
Mirror/retain FlexPositionProperties | not specified | false | Use the Design/Model-specific default layout. |
Mirror/retain FlexPositionProperties | not specified | not specified | Use the Design/Model-specific default layout. |
Syntax
Type
Boolean
Read/Write
No (only during widget-construction time)
Example
Platform Availability
- Available in IDE
- Windows, iOS, Android, and SPA
selectedIndex Property
Indicates the currently selected row in the HorizontalImageStrip. The index is with respect to the order in which data is set with data property. Programmatically setting the selected Index will not make any visible differences in the row, however it will bring the row at the index into the view able area on the screen. Setting it to null/nil clears the selection state.In JavaScript the Index is ‘0’ based.
Syntax
Type
Number
Read/Write
Yes - (Read and Write)
Remarks
Note: If data contains the sections then the selectedIndex indicates the selected row index within the section.
Example
Platform Availability
Not available in the IDE.
Available on all platforms.
selectedItem Property
Returns the selected data object (input array) corresponding to the selected image of the HorizontalImageStrip. If no image is selected, null/nil is returned.
Syntax
Type
JSObject
Read/Write
Read only
Example
Platform Availability
Not available in the IDE.
Available on all platforms.
showArrows Property
Specifies the arrow images must be displayed on the left and right edges of the HorizontalImageStrip.
Syntax
Type
Boolean
Read/Write
No
Remarks
The default value for this property is false. If set to true, the arrows are displayed. If set to false, the arrows are not displayed.
Example
Platform Availability
Available in the IDE.
Available on all platforms.
showScrollbars Property
Specifies if the scrollbars must be visible all the time.
Syntax
Type
Boolean
Read/Write
No
Remarks
The default value for this property depends on the native platform behavior.
Example
Platform Availability
Available in the IDE.
Available on all platforms..
skin Property
Specifies the look and feel of the HorizontalImageStrip when not in focus.
Syntax
Type
String
Read/Write
Yes - (Read and Write)
Example
Platform Availability
Available in the IDE.
Available on all platforms.
spaceBetweenImages Property
Specifies the space between the images in the horizontal image strip.
Syntax
Type
Number
Read/Write
No
Example
Platform Availability
Available in the IDE.
Available on all platforms.
toolTip Property
Specifies the hint text when the cursor hovers over a widget, without clicking it. The text entered in the tooltip appears as a small box when the cursor hovers over a widget.
Syntax
Type
String
Read/Write
Yes - (Read and Write)
Example
Platform Availability
Available in the IDE.
This property is available on Windows Tablet.
transform Property
Contains an animation transformation that can be used to animate the widget.
Syntax
Type
JSObject
Read/Write
Read + Write
Remarks
This property is set to the identify transform by default. Any transformations applied to the widget occur relative to the widget’s anchor point. The transformation contained in this property must be created using the voltmx.ui.makeAffineTransform function.
Example
This example uses the button widget, but the principle remains the same for all widgets that have a transform property.
Platform Availability
- iOS, Android, Windows, and SPA
viewConfig Property
Specifies the view configuration properties for various view types in the horizontal image strip.
Syntax
Type
JSObject
Read/Write
Read and Write
Remarks
Following are the available view types:
- HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW:The cover flow view enables you to flip through the images placed in a horizontal Image strip and bring the associated images into view. This property accepts a JSObject with the below key-value pairs:
- projectionAngle [Number]: Specifies the angle in degrees between a row except at center and at z-axis. When the projection angle is 0, all the rows are aligned along z-axis one behind the other. When previewed, it only shows one row at center. When projection angle is 90, all the rows are aligned along x-axis side by side. If the value entered is negative then the resultant angle is 90 + entered value. For example, if projection angle is -30 then resultant projection angle is 90 - 30 = 60 degrees. It accepts a range between -90 and +90 only. (Available on Android only)
- imageItemRotationAngle [Number]: Specifies the angle in degrees of rotation of each row along its own y-axis. It accepts a range between 0 and 360. (Available only on Android)
- isCircular [Boolean]: When set to true, it specifies the widget to scroll endlessly (repeating the first row after you reach the last row) and when set to false, it stops scrolling after you reach the last row. (Available only on Android)
- HORIZONTAL_IMAGESTRIP_VIEW_TYPE_ SLOTVIEW:This property accepts a JSObject with the below key-value pairs:
- flingVelocity: Accepts a number (in density independent pixels) representing the velocity at which user flings the imagestrip to activate auto-flipping the images. Not mandatory (Available only on Android)
- flipInterval: Accepts a number in milliseconds representing the time interval to wait before flipping to the next image. This is applicable when auto-flipping is activated when user flings. (Available only on Android)
- scrollDistance: Accepts a number (in density independent pixel) representing the touch scroll distance to travel to consider for navigation between images. Not mandatory (Available only on Android)
- HORIZONTAL_IMAGESTRIP_VIEW_TYPE_STRIPVIEW:This property accepts a JSObject with the below key-value pairs:
- enableScrollBounce:A boolean to enable/disable the bouncing effect when the stripview reaches the end of the scroll. Default value is true. (Available only on SPA).
Example
Platform Availability
- Available in the IDE.
- Available on all platforms.
viewType Property
Specifies the view type of Horizontal Image Strip.
Syntax
Type
Number
Read/Write
No
Remarks
The default value for this property is HORIZONTAL_IMAGESTRIP_VIEW_TYPE_STRIPVIEW.
The below table shows the list of view types and their availability in different platforms:
viewType | iPhone | Android | BlackBerry /J2ME/Windows Phone/SPA | Windows Desktop |
---|---|---|---|---|
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_STRIPVIEW | Yes | Yes | Yes | Yes |
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_SLOTVIEW | Yes | Yes | Yes | No |
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_LINEAR | Yes | No | No | No |
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_ROTARY | Yes | No | No | No |
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_INVERTED_ROTARY | Yes | No | No | No |
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_CYLINDRICAL | Yes | No | No | No |
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_INVERTED_CYLINDRICAL | Yes | No | No | No |
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW | Yes | Yes | No | No |
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW2 | Yes | No | No | No |
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_STACK | Yes | No | No | No |
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_PAGEVIEW | No | No | Yes | Yes |
Following are the available view types:
- HORIZONTAL_IMAGESTRIP_VIEW_TYPE_STRIPVIEW: In this view the images are placed side by side and looks as if the images are placed in a strip. You can scroll through the images and view the desired image.
- HORIZONTAL_IMAGESTRIP_VIEW_TYPE_ SLOTVIEW:In this view the images are displayed one at a time. The images change with the left or right gesture. This view is useful when you want to present a 360 degree view of an object.
-
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_ LINEAR:Displays images in a linear view; which is very similar to the existing views, where you can scroll the images horizontally. You can scroll across the imagestrip by moving them forward or backward as shown in the figure.
-
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_ROTARY:Displays an imagestrip that rotates around the axis of reference, where the current image is projected inwards and the other images appear closer to the user than the current image. There won’t be any image skewing or tilting like in the cover flow view.
-
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_INVERTED_ROTARY:Displays an imagestrip that rotates around the axis of reference, where the current image is projected inwards and the other images appear closer to the user than the current image. There won’t be any image skewing or tilting like in the cover flow view.
-
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_CYLINDRICAL:Displays an imagestrip as a cylinder. All the images of the imagestrip form a horizontal cylinder (polygon) and the cylinder rotates based on the user’s gesture. In the Cylinder view, the image strip appear as if the user is viewing at the cylinder from outside. Images get skewed as you move along the axis of reference of the cylinder. You can rotate the image strip around the axis of reference as shown in the figure.
-
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_INVERTED_CYLINDRICAL:Displays an imagestrip as a cylinder. All the images of the imagestrip form a horizontal cylinder (polygon) and the cylinder rotates based on user’s gesture. In the Inverted Cylinder view, the image strip appear as if the user is viewing the cylinder from inside. Images get skewed as you move the imagestrip along the axis of reference. You can rotate the image strip around the axis of reference as shown in the figure.
-
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW:Regular cover flow view. The cover flow view enables you to flip through the images and bring the associated image into view. You can flip through the images as shown in the figure.
- HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW2:Similar to the Cover flow view with more skewing or tilting.
-
HORIZONTAL_IMAGESTRIP_VIEW_TYPE_STACK:Custom stack view where the image strip appear as a stack. Images can be moved inside and outside the stack based on the user’s gesture as shown in the figure below.
- HORIZONTAL_IMAGESTRIP_VIEW_TYPE_PAGEVIEW:In this view the images are displayed pagewise. You can scroll through the images and view the desired image. If you do not specify the width of an image, by default only 3 images appear in a page. If you specify the width of the image, images are displayed as per the screen width. You can view the page you are on or view the images exist by viewing the page indicator below.
Example
Platform Availability
Available in the IDE.
Available on all platforms.