From 163751189b2f3a1c94eded6c549c49353eb25888 Mon Sep 17 00:00:00 2001 From: Evan Leybourn Date: Sun, 21 Nov 2010 06:44:22 +1100 Subject: [PATCH] Dates will now popup --- src/com/eleybourn/bookcatalogue/BookEditFields.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/eleybourn/bookcatalogue/BookEditFields.java b/src/com/eleybourn/bookcatalogue/BookEditFields.java index c900b71..2bc0810 100644 --- a/src/com/eleybourn/bookcatalogue/BookEditFields.java +++ b/src/com/eleybourn/bookcatalogue/BookEditFields.java @@ -867,7 +867,12 @@ public class BookEditFields extends Activity { } catch (NumberFormatException e) { pages = 0; } - String format = spinnerAdapter.getItem(mFormatText.getSelectedItemPosition()); + String format = ""; + try { + format = spinnerAdapter.getItem(mFormatText.getSelectedItemPosition()); + } catch (IndexOutOfBoundsException e) { + //do nothing - format is hidden + } String description = mDescriptionText.getText().toString(); String genre = mGenreText.getText().toString();