The basic properties for HorizontalImageStrip widget are:
Enables you to control accessibility behavior and alternative text for the widget.
For more information on using accessibility features in your app, refer Accessibility appendix.
Syntax
accessibilityConfig
Type
Object
Read/Write
Read + Write
Remarks
The accessibilityConfig property is enabled for all the widgets which are supported under the Flex Layout.
The accessibilityConfig property is a JavaScript object which can contain the following key-value pairs.
a11yLabel [String]
Optional. Specifies alternate text to identify the widget. Generally the label should be the text that is displayed on the screen.
a11yValue [String]
Optional. Specifies the current state/value associated with the widget so that the user can perform an action. For example, a checkbox is in selected state or unselected state. On the Android platform, the text specified for a11yLabel is prefixed to the a11yValue.
a11yHint [String]
Optional. 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.
a11yHidden [Boolean]
Optional. 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
Android limitations
SPA/Desktop Web limitations
Example
This example uses the button widget, but the principle remains the same for all widgets that have an accessibilityConfig property.
//This is a generic property that is applicable for various widgets. //Here, we have shown how to use the accessibilityConfig Property for button widget. /*You need to make a corresponding use of the accessibilityConfig property for other applicable widgets.*/ Form1.myButton.accessibilityConfig = { "a11yLabel": "Label", "a11yValue": "Value", "a11yHint": "Hint" };
Platform Availability
Specifies the anchor point of the widget bounds rectangle using the widget's coordinate space.
Syntax
anchorPoint
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
Form1.widget1.anchorPoint = { "x": 0.5, "y": 0.5 };
Platform Availability
Specifies the configurable arrow properties of the HorizontalImageStrip. This property is available only when showArrows is set to true.
Syntax
arrowConfig
Type
JSObject
Read/Write
No
Remarks
The available options are:
Note: The options leftArrowFocusImage and rightArrowFocusImage are not supported in
Example
//Defining the properties for Horizontal Image strip with arrowConfig. var hISBasic={id:"hIS", skin:"hISkn", focusSkin:"hISknFocus", isVisible:true,selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"},"imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, howArrows:true, showScrollbars:true, arrowConfig:{ "leftArrowImage":"lArrow.png", "leftArrowFocusImage" :"lArrowFoc.png", "rightArrowImage":"rArrow.png", "rightArrowFocusImage":"rArrowFoc.png"}}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP); //Reading arrowConfig of Horizontal Image strip kony.print("Horizontal Image strip arrowConfig::"+hIS.arrowConfig);
Platform Availability
Available in the IDE.
Available on all platforms.
Specifies the JSObject which represents the images to be rendered in horizontal image strip.
Data format of JavaScript object
//Data format of JavaScript object formname.widgetname.data= [ [ {"imagekey":"image1.png", accessibilityConfig:acObject}, {"imagekey": "image2.png", accessibilityConfig:acObject}, {"imagekey": "imagen.png", accessibilityConfig:acObject} ], "imagekey" ];
Syntax
data
Type
Array
Read/Write
Yes - (Read and Write)
Remarks
Data format:An array with two elements.
Example
//Defining the properties for Horizontal Image strip with data: //[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"}, "imagekey"]] var hISBasic= { id:"hIS", skin:"hISkn", focusSkin:"hISknFocus", isVisible:true, selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data: [ [ { "imagekey":"image1.png", accessibilityConfig:acObject }, { "imagekey":"image2.png", accessibilityConfig:acObject }, "imagekey" ] ], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, showArrows:true, showScrollbars:true }; var hISLayout= { padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP); //Reading data of Horizontal Image strip kony.print("Horizontal Image strip data::"+hIS.data);
Platform Availability
Available in the IDE.
Available on all platforms.
The property enables you to improve the performance of Positional Dimension Animations.
Syntax
enableCache
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
Form1.widgetID.enableCache = true;
Platform Availability
Specifies the look and feel of the widget when in focus.
Syntax
focusSkin
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
//Defining the properties for Horizontal Image strip with focusSkin:"hISknFocus" var hISBasic={id:"hIS", skin:"hISkn", focusSkin:"hISknFocus", isVisible:true,selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"}, "imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, showArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP); //Reading focusSkin of Horizontal Image strip. kony.print("Horizontal Image strip focusSkin::"+hIS.focusSkin);
Platform Availability
Available in the IDE.
Available on all platforms. platforms.
Specifies the look and feel of a widget when the cursor hovers on the widget.
Syntax
hoverSkin
Type
String
Read/Write
Yes
Example
//Defining the properties for a HzImageStrip with hoverSkin:"hskin" var hISBasic={id:"his1", isVisible:true, skin:"hISkin", focusSkin:"hISFSkin", text:"Click Here" }; var hIS={padding:[5,5,5,5], margin:[5,5,5,5], hExpand:true, vExpand:false, displayText:true}; var hISPSP={hoverSkin:"hskin"}; //Creating the HzImageStrip. var his1 = new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP);
Platform Availability
Available in the IDE.
This property is available on Windows Tablet.
id is a unique identifier of HorizontalImageStrip consisting of alpha numeric characters. Every HorizontalImageStrip should have a unique id within a Form.
Syntax
id
Type
String - [Mandatory]
Read/Write
Yes - (Read only)
Example
//Defining the properties for Horizontal Image strip with id:"hIS" var hISBasic={id:"hIS", skin:"hISkn", focusSkin:"hISknFocus", isVisible:true, selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"}, "imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, howArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP); //Reading id of Horizontal Image strip kony.print("Horizontal Image strip id::"+hIS.id);
Platform Availability
Available in the IDE.
Available on all platforms.
Specifies the image to be displayed when the remote resource is not available. This image is taken from the resources folder.
Syntax
imageWhenFailed
Type
String
Read/Write
No
Example
//Defining the properties for Horizontal Image strip with imageWhenFailed:"img3.png" var hISBasic={id:"hIS",skin:"hISkn", focusSkin:"hISknFocus", isVisible:true, selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"}, "imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, showArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP);
Platform Availability
Available in the IDE.
Available on all platforms. and Windows Desktop platforms.
Specifies the image to be displayed when the remote source is still being downloaded. This image is taken from the resources folder.
Syntax
imageWhileDownloading
Type
String
Read/Write
No
Example
//Defining the properties for Horizontal Image strip with imageWhileDownloading:"img.png" var hISBasic={id:"hIS", skin:"hISkn", focusSkin:"hISknFocus", isVisible:true, selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"},{"imagekey":"image2.png"}, "imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, showArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP);
Platform Availability
Available in the IDE.
Available on all platforms except Server side Mobile Web and Windows Desktop platforms.
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,
var inf = {a: 'hello'}; widget.info = inf; //works widget.info.a = 'hello world'; //This will not update the widget info a property to Hello world. //widget.info.a will have old value as hello.
Syntax
info
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
//Defining the properties for Horizontal Image strip with info property. var hISBasic={id:"hIS", skin:"hISkn", focusSkin:"hISknFocus", isVisible:true, selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"}, "imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, showArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], paddingInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP); hIS.info = {key:"horizontal images"}; //Reading info of Horizontal Image strip kony.print("Horizontal Image strip info is ::"+hIS.info);
Platform Availability
Not available in the IDE.
Available on all platforms.
This property controls the visibility of a widget on the form.
Syntax
isVisible
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
//Defining the properties for Horizontal Image strip with isVisible:true var hISBasic={id:"hIS",skin:"hISkn", focusSkin:"hISknFocus", isVisible:true, selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"}, "imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, showArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP); //Reading isVisible of Horizontal Image strip kony.print("Horizontal Image strip isVisible::"+hIS.isVisible);
Platform Availability
Available in the IDE.
Available on all platforms.
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.
function getIsFlexPositionalShouldMirror(widgetRetainFlexPositionPropertiesValue) { return (isI18nLayoutConfigEnabled && localeLayoutConfig[defaultLocale] ["mirrorFlexPositionalProperties"] == true && !widgetRetainFlexPositionPropertiesValue); }
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
retainContentAlignment
Type
Boolean
Read/Write
No (only during widget-construction time)
Example
//This is a generic property that is applicable for various widgets. //Here, we have shown how to use the retainContentAlignment property for Button widget. /*You need to make a corresponding use of the retainContentAlignment property for other applicable widgets.*/ var btn = new kony.ui.Button({ "focusSkin": "defBtnFocus", "height": "50dp", "id": "myButton", "isVisible": true, "left": "0dp", "skin": "defBtnNormal", "text": "text always from top left", "top": "0dp", "width": "260dp", "zIndex": 1 }, { "contentAlignment": constants.CONTENT_ALIGN_TOP_LEFT, "displayText": true, "padding": [0, 0, 0, 0], "paddingInPixel": false, "retainFlexPositionProperties": false, "retainContentAlignment": true }, {});
Platform Availability
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.
function getIsFlexPositionalShouldMirror(widgetRetainFlexPositionPropertiesValue) { return (isI18nLayoutConfigEnabled && localeLayoutConfig[defaultLocale] ["mirrorFlexPositionalProperties"] == true && !widgetRetainFlexPositionPropertiesValue); }
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
retainFlexPositionProperties
Type
Boolean
Read/Write
No (only during widget-construction time)
Example
//This is a generic property that is applicable for various widgets. //Here, we have shown how to use the retainFlexPositionProperties property for Button widget. /*You need to make a corresponding use of the retainFlexPositionProperties property for other applicable widgets.*/ var btn = new kony.ui.Button({ "focusSkin": "defBtnFocus", "height": "50dp", "id": "myButton", "isVisible": true, "left": "0dp", "skin": "defBtnNormal", "text": "always left", "top": "0dp", "width": "260dp", "zIndex": 1 }, { "contentAlignment": constants.CONTENT_ALIGN_CENTER, "displayText": true, "padding": [0, 0, 0, 0], "paddingInPixel": false, "retainFlexPositionProperties": true, "retainContentAlignment": false }, {});
Platform Availability
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.
function getIsFlexPositionalShouldMirror(widgetRetainFlexPositionPropertiesValue) { return (isI18nLayoutConfigEnabled && localeLayoutConfig[defaultLocale] ["mirrorFlexPositionalProperties"] == true && !widgetRetainFlexPositionPropertiesValue); }
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
retainFlowHorizontalAlignment
Type
Boolean
Read/Write
No (only during widget-construction time)
Example
//This is a generic property that is applicable for various widgets. //Here, we have shown how to use the retainFlowHorizontalAlignment property for Button widget. /*You need to make a corresponding use of the retainFlowHorizontalAlignment property for other applicable widgets. */ var btn = new kony.ui.Button({ "focusSkin": "defBtnFocus", "height": "50dp", "id": "myButton", "isVisible": true, "left": "0dp", "skin": "defBtnNormal", "text": "always left", "top": "0dp", "width": "260dp", "zIndex": 1 }, { "contentAlignment": constants.CONTENT_ALIGN_CENTER, "displayText": true, "padding": [0, 0, 0, 0], "paddingInPixel": false, "retainFlexPositionProperties": true, "retainContentAlignment": false, "retainFlowHorizontalAlignment ": false }, {});
Platform Availability
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
selectedIndex
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
//Defining the properties for Horizontal Image strip with selectedIndex:1 var hISBasic={id:"hIS",skin:"hISkn", focusSkin:"hISknFocus", isVisible:true,selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"},"imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, showArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP); //Reading selectedIndex of Horizontal Image strip kony.print("Horizontal Image strip selectedIndex::"+hIS.selectedIndex);
Platform Availability
Not available in the IDE.
Available on all platforms.
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
selectedItem
Type
JSObject
Read/Write
Read only
Example
//Defining the properties for Horizontal Image strip with selectedIndex:1 var hISBasic={id:"hIS",skin:"hISkn", focusSkin:"hISknFocus", isVisible:true, selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"},"imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, showArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP); //Reading selectedItem of Horizontal Image strip kony.print("Horizontal Image strip selectedItem::"+hIS.selectedItem);
Platform Availability
Not available in the IDE.
Available on all platforms.
Specifies the arrow images must be displayed on the left and right edges of the HorizontalImageStrip.
Syntax
showArrows
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
//Defining the properties for Horizontal Image strip with showArrows:true var hISBasic={id:"hIS",skin:"hISkn", focusSkin:"hISknFocus", isVisible:true, selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"}, "imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, showArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP); //Reading showArrows of Horizontal Image strip kony.print("Horizontal Image strip showArrows::"+hIS.showArrows);
Platform Availability
Available in the IDE.
Available on all platforms.
Specifies if the scrollbars must be visible all the time.
Syntax
showScrollbars
Type
Boolean
Read/Write
No
Remarks
The default value for this property depends on the native platform behavior.
Example
//Defining the properties for Horizontal Image strip with showScrollbars:true var hISBasic={id:"hIS",skin:"hISkn", focusSkin:"hISknFocus", isVisible:true, selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"}, "imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW,showArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP); //Reading showScrollbars of Horizontal Image strip kony.print("Horizontal Image strip showScrollbars::"+hIS.showScrollbars);
Platform Availability
Available in the IDE.
Available on all platforms..
Specifies the look and feel of the HorizontalImageStrip when not in focus.
Syntax
skin
Type
String
Read/Write
Yes - (Read and Write)
Example
//Defining the properties for Horizontal Image strip with skin:"hISkn" var hISBasic={id:"hIS", skin:"hISkn", focusSkin:"hISknFocus", isVisible:true, selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"},{"imagekey":"image2.png"}, "imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, showArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP); //Reading skin of Horizontal Image strip kony.print("Horizontal Image strip Skin::"+hIS.skin);
Platform Availability
Available in the IDE.
Available on all platforms.
Specifies the space between the images in the horizontal image strip.
Syntax
spaceBetweenImages
Type
Number
Read/Write
No
Example
//Defining the properties for Horizontal Image strip with spaceBetweenImages:20 var hISBasic={id:"hIS",skin:"hISkn", focusSkin:"hISknFocus", isVisible:true, selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"}, "imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, showArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP);
Platform Availability
Available in the IDE.
Available on all platforms.
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
toolTip
Type
String
Read/Write
Yes - (Read and Write)
Example
//Defining the properties for a HzImageStrip with toolTip:sample text var hISBasic= {id:"hIS1", isVisible:true, skin:"hISkin", focusSkin:"hISFSkin", text:"Click Here" }; var hISLayout= { padding:[5,5,5,5], margin:[5,5,5,5], hExpand:true, vExpand:false, displayText:true}; var hISPSP= {toolTip:"sample text"}; //Creating the HzImageStrip. var hIS1 = new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP);
Platform Availability
Available in the IDE.
This property is available on Windows Tablet.
Contains an animation transformation that can be used to animate the widget.
Syntax
transform
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 kony.ui.makeAffineTransform function.
Example
This example uses the button widget, but the principle remains the same for all widgets that have a transform property.
//Animation sample var newTransform = kony.ui.makeAffineTransform(); newTransform.translate3D(223, 12, 56); //translates by 223 xAxis,12 in yAxis,56 in zAxis widget.transform = newTransform;
Platform Availability
Specifies the view configuration properties for various view types in the horizontal image strip.
Syntax
viewConfig
Type
JSObject
Read/Write
Read and Write
Remarks
Following are the available view types:
Example
//Defining the properties for a HorizontalImageStrip with viewConfig. var hISBasic= {id:"hIS1", isVisible:true, skin:"hISkin", focusSkin:"hISFSkin", text:"Click Here", viewConfig:{stripViewConfig:{enableScrollBounce:true}} }; var hISLayout= { padding:[5,5,5,5], margin:[5,5,5,5], hExpand:true, vExpand:false, displayText:true}; var hISPSP={}; //Creating the HzImageStrip. var hIS1 = new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP);
Platform Availability
Specifies the view type of Horizontal Image Strip.
Syntax
viewType
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 |
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:
Example
//Defining the properties for Horizontal Image strip with viewType as COVERFLOW. var hISBasic={id:"hIS", skin:"hISkn", focusSkin:"hISknFocus", isVisible:true, selectedIndex:1, imageWhileDownloading:"img.png", imageWhenFailed:"img3.png", spaceBetweenImages:20, data:[[{"imagekey":"image1.png"}, {"imagekey":"image2.png"}, "imagekey"]], viewType:constants.HORIZONTAL_IMAGESTRIP_VIEW_TYPE_COVERFLOW, showArrows:true, showScrollbars:true}; var hISLayout={padding:[5,5,5,5], margin:[5,5,5,5], paddingInPixel:true, marginInPixel:true, referenceWidth:100, referenceHeight:100, imageScaleMode:constants.IMAGE_SCALE_MODE_FIT_TO_DIMENSIONS, }; var hISPSP={}; //Creating the Horizontal Image strip. var hIS=new kony.ui.HorizontalImageStrip2(hISBasic, hISLayout, hISPSP); //Reading viewType of Horizontal Image strip. kony.print("Horizontal Image strip viewType::"+hIS.viewType);
Platform Availability
Available in the IDE.
Available on all platforms.
prem | Copyright © 2012 Kony, Inc. All rights reserved. |
prem | Copyright © 2012 Kony, Inc. All rights reserved. |