From d4f8acfdbbc3ade0d29cb2e7eee3192033d6a11c Mon Sep 17 00:00:00 2001 From: rkodev <43806892+rkodev@users.noreply.github.com> Date: Tue, 19 Feb 2019 16:13:52 +0300 Subject: [PATCH 1/3] Issue #142 Clear age text when date picker is reset Clear the date picker 'Age' values when widget looses relevance Signed-off-by: Ronald Kudoyi --- .../com/vijay/jsonwizard/activities/JsonFormActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/JsonFormActivity.java b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/JsonFormActivity.java index abdddd25f..4f84452a5 100644 --- a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/JsonFormActivity.java +++ b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/JsonFormActivity.java @@ -1722,6 +1722,11 @@ private void refreshViews(View childElement) { } else if (child instanceof MaterialSpinner) { MaterialSpinner spinner = (MaterialSpinner) child; spinner.setSelected(false); + } else if(child instanceof TextView){ + // clear duration for custom date picker + if(child.getId() == R.id.duration){ + ((TextView) child).setText(""); + } } refreshViews(group.getChildAt(id)); } From 24f028ff9ae20d01e539dbaac986fe66d1968d6a Mon Sep 17 00:00:00 2001 From: rkodev <43806892+rkodev@users.noreply.github.com> Date: Tue, 19 Feb 2019 16:31:16 +0300 Subject: [PATCH 2/3] Version Change --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index a29345eae..1cd55aa78 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=1.4.8-SNAPSHOT +VERSION_NAME=1.4.9-SNAPSHOT VERSION_CODE=1 GROUP=org.smartregister POM_SETTING_DESCRIPTION=OpenSRP Client Native Form Json Wizard From 65ff0d4df19b88ccb7375da5f8545db662e2ce49 Mon Sep 17 00:00:00 2001 From: rkodev <43806892+rkodev@users.noreply.github.com> Date: Tue, 19 Feb 2019 17:17:24 +0300 Subject: [PATCH 3/3] Collapsed If --- .../com/vijay/jsonwizard/activities/JsonFormActivity.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/JsonFormActivity.java b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/JsonFormActivity.java index 4f84452a5..f61e00515 100644 --- a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/JsonFormActivity.java +++ b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/JsonFormActivity.java @@ -1722,11 +1722,9 @@ private void refreshViews(View childElement) { } else if (child instanceof MaterialSpinner) { MaterialSpinner spinner = (MaterialSpinner) child; spinner.setSelected(false); - } else if(child instanceof TextView){ + } else if(child instanceof TextView && child.getId() == R.id.duration){ // clear duration for custom date picker - if(child.getId() == R.id.duration){ - ((TextView) child).setText(""); - } + ((TextView) child).setText(""); } refreshViews(group.getChildAt(id)); }