Code example for Gallery

Methods: getCountsetSelection, getSelectedItemPosition