* Maps string values to calendar dates and vice versa.
*/
public class DateBindMapping implements Spinner.ItemBindMapping {
public int indexOf(List<?> spinnerData, Object value) {
CalendarDateSpinnerData calendarDateSpinnerData = (CalendarDateSpinnerData)spinnerData;
return calendarDateSpinnerData.indexOf(CalendarDate.decode((String)value));
}
public Object get(List<?> spinnerData, int index) {
return spinnerData.get(index).toString();
}