ImageGallery represents a set of images adjacent to each other. If the images exceed the row size, they are pushed to the next line.
You can add the ImageGallery Widget only to the VBox form. This widget will be available in the Widgets palette when the VBox form is selected in the app canvas.
This section provides the following documentation on this Widget.
Allows the developer to execute custom javascript function when the ImageGallery is invoked.
ImageGallery Overviews
Note: ImageGallery widget is not supported in BlackBerry 10 platform.
Creating an Image Gallery using a constructor: kony.ui.ImageGallery
var imagegallery1 = new kony.ui.ImageGallery2 (basicConf, layoutConf, pspConf)
basicConf is an object with basic properties.
layoutConf is an object with layout properties.
pspConf is an object with platform specific properties.
Note: The configuration properties should be passed only in the respective configuration objects otherwise they are ignored
Example
//Defining properties for ImageGallery.
var imgGalBasic =
{
id: "imgGallery",
isVisible: true,
skin: "gradroundfocusbtn",
focusSkin: "gradroundfocusbtn",
selectedIndex:3,
spaceBetweenImages: 50
};
var imgGalLayout = {containerWeight:50};
var imgGalPSP = {itemsPerRow:3, navigationBarPosition:"Bottom"};
//Creating the ImageGallery.
var imgGallery = new kony.ui.ImageGallery(imgGalBasic,imgGalLayout,imgGalPSP );
//Reading the containerWeight of ImageGallery.
alert("ImageGallery containerWeight is ::"+imgGallery.containerWeight);
For backward compatibility with support for all deprecated properties and behaviors, use the constructor kony.ui.ImageGallery.
var imageGal1= new kony.ui.ImageGallery (basicConf, layoutConf, pspConf)
Customizing Appearance
You can customize the appearance of the Image Gallery using the following properties:
imageScaleMode: Specifies the scale mode for all the images in the ImageGallery.
referenceHeight: Specifies the reference height of the ImageGallery in pixels.
referenceWidth: Specifies the reference width of the ImageGallery in pixels.
margin: Defines the space around a widget.
skin: Specify the skin to be applied to the images in the Image Gallery.
focusSkin: Specify the skin to be applied to the individual image in the ImageGallery when in focus.
Important Considerations:
The Image Gallery occupies 100% of the screen width.
On devices which have a navigation key, you can use the up or down keys to navigate through the images.
Form cycling is supported (i.e, if you reach the end of the gallery and if it is the last widget, you are taken to the first control of the form).
For Symbian, Image gallery always uses an image size of 64x64 pixels.
For Windows Desktop, Image Gallery widget behaves like a screen-level widget,hence HorizontalImageStrip is preferred while using images.