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] 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)); }