From 3b3c1024b0650440c20005e1343a7ac1c6d57a4f Mon Sep 17 00:00:00 2001 From: johntheripp3r Date: Tue, 17 Dec 2013 12:51:13 +0530 Subject: [PATCH 1/2] Init --- library/project.properties | 2 +- samples/project.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/project.properties b/library/project.properties index ceb56f0..8aaa999 100644 --- a/library/project.properties +++ b/library/project.properties @@ -8,6 +8,6 @@ # project structure. # Project target. -target=android-16 +target=Google Inc.:Google APIs:19 android.library=true diff --git a/samples/project.properties b/samples/project.properties index 6bc6422..798b8b2 100644 --- a/samples/project.properties +++ b/samples/project.properties @@ -11,5 +11,5 @@ #proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt # Project target. -target=android-16 +target=Google Inc.:Google APIs:19 android.library.reference.1=../library From 42965086196d7569a67fe09ade376a584e37c51e Mon Sep 17 00:00:00 2001 From: johntheripp3r Date: Tue, 17 Dec 2013 12:58:47 +0530 Subject: [PATCH 2/2] getValueAsString() function added to directly retrieve the String value of numberpicker --- library/src/net/simonvt/numberpicker/NumberPicker.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/library/src/net/simonvt/numberpicker/NumberPicker.java b/library/src/net/simonvt/numberpicker/NumberPicker.java index a1b1fe5..dac6554 100644 --- a/library/src/net/simonvt/numberpicker/NumberPicker.java +++ b/library/src/net/simonvt/numberpicker/NumberPicker.java @@ -1311,7 +1311,15 @@ public void setOnLongPressUpdateInterval(long intervalMillis) { public int getValue() { return mValue; } - + + /** + * Returns the displayed value of the Picker as String + * + * */ + public String getValueAsString() + { + return (mDisplayedValues != null && mDisplayedValues.length > 0) ? mDisplayedValues[getValue()] : null; + } /** * Returns the min value of the picker. *