From a787630deed303eae20b45920c2da1470b09fc9f Mon Sep 17 00:00:00 2001 From: LZRS Date: Fri, 9 Jul 2021 16:02:41 +0300 Subject: [PATCH] refactor name isUsingLocaleForms to supportsLocaleBasedForms and other formatting improvements --- .../activities/FormConfigurationJsonFormActivity.java | 6 +++--- .../FormConfigurationJsonWizardFormActivity.java | 8 ++++---- .../NoLocaleFormConfigurationJsonWizardFormActivity.java | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/FormConfigurationJsonFormActivity.java b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/FormConfigurationJsonFormActivity.java index aac2110cc..0ee860ee0 100644 --- a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/FormConfigurationJsonFormActivity.java +++ b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/FormConfigurationJsonFormActivity.java @@ -44,14 +44,14 @@ protected void onCreate(Bundle savedInstanceState) { checkIfFormUpdate(jsonObject); } - private FormUtils getFormUtils(){ - if (!this.isUsingLocaleForms()){ + private FormUtils getFormUtils() { + if (!this.supportsLocaleBasedForms()) { return new NoLocaleFormUtils(); } return new FormUtils(); } - protected boolean isUsingLocaleForms(){ + protected boolean supportsLocaleBasedForms() { return true; } diff --git a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/FormConfigurationJsonWizardFormActivity.java b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/FormConfigurationJsonWizardFormActivity.java index c1337714c..f310c916a 100644 --- a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/FormConfigurationJsonWizardFormActivity.java +++ b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/FormConfigurationJsonWizardFormActivity.java @@ -4,12 +4,12 @@ import org.json.JSONException; -public class FormConfigurationJsonWizardFormActivity extends FormConfigurationJsonFormActivity{ +public class FormConfigurationJsonWizardFormActivity extends FormConfigurationJsonFormActivity { private final JsonWizardFormDelegate delegate = new JsonWizardFormDelegate(); @Override - public void initializeFormFragment() { + public synchronized void initializeFormFragment() { initializeFormFragmentCore(); } @@ -23,7 +23,7 @@ public void onFormFinish() { callSuperFinish(); } - protected void callSuperFinish(){ + protected void callSuperFinish() { super.onFormFinish(); } @@ -31,7 +31,7 @@ protected void callSuperWriteValue(String stepName, String key, String value, St super.writeValue(stepName, key, value, openMrsEntityParent, openMrsEntity, openMrsEntityId); } - protected void initializeFormFragmentCore(){ + protected void initializeFormFragmentCore() { delegate.initializeFormFragmentCore(this.getSupportFragmentManager()); } } diff --git a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/NoLocaleFormConfigurationJsonWizardFormActivity.java b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/NoLocaleFormConfigurationJsonWizardFormActivity.java index 1ecbbdc27..19b83665f 100644 --- a/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/NoLocaleFormConfigurationJsonWizardFormActivity.java +++ b/android-json-form-wizard/src/main/java/com/vijay/jsonwizard/activities/NoLocaleFormConfigurationJsonWizardFormActivity.java @@ -2,7 +2,7 @@ public class NoLocaleFormConfigurationJsonWizardFormActivity extends FormConfigurationJsonWizardFormActivity { @Override - protected boolean isUsingLocaleForms() { + protected boolean supportsLocaleBasedForms() { return false; } }