Code example for Gallery

Methods: getSelectedItemPosition

0
    public void onClick(DialogInterface dialog, int which) {
        if (mCallback != null) {
			 
			hsel = hour.getSelectedItemPosition();
			msel = min.getSelectedItemPosition();
			ssel = sec.getSelectedItemPosition();
			 
            int[] values = {hsel,msel,ssel};
            mCallback.onNumbersPicked(values);
        } 
    } 
}