Gallery Control

IOSUIGallery is used to display items in GRID or GALLERY mode.

In GRID mode the items is displayed in columns/rows. The cell size is determined by the item's minimum width. The control creates as much column as possible in the available space and the remaining space distributed between columns equally.

In GALLERY mode the items placed horizontally, displaying one item at a time.

The above video shows the GRID mode.

For GALLERY demo see the video below: when an Album is selected it will display the pictures in GALLERY mode.

To specify the items used in the IOSUIGallery control, you must implement IOSUIGAlleryModel:

public interface IOSUIGalleryModel {
	int getItemCount();
	int getMinimumCellHeight();
	int getMinimumCellWidth();
	IOSUIComponent getItem(int idx);
	void dropItem(int idx);
}

  • getItemCount() - specify the number of itmes in the model
  • getMinimumCellHeight(),getMinimumCellWidht() - the cell's minimum dimension in GRID mode
  • getItem() - provide the item's content
  • dropItem() - IOSUIGallery creates the items as they needed (become visible) and caches them. If the cache is full, it will drop the oldest items from it and call the model's drop item to let release resources if any.