diff --git a/app/src/main/java/com/sf/stormwaterutilityandroid/WaterWay/ChemicalTesting.java b/app/src/main/java/com/sf/stormwaterutilityandroid/WaterWay/ChemicalTesting.java index 6d25e79..adb5e8f 100644 --- a/app/src/main/java/com/sf/stormwaterutilityandroid/WaterWay/ChemicalTesting.java +++ b/app/src/main/java/com/sf/stormwaterutilityandroid/WaterWay/ChemicalTesting.java @@ -54,63 +54,45 @@ private void setupForm() { //Outfall --> Question: How do you do a subheading? - FormElementTextSingleLine temperature = new FormElementTextSingleLine().setTitle("Temperature (C) Change"); - FormElementTextNumber tempData = FormElementTextNumber.createInstance(); //what data type is this? - tempVal = Double.parseDouble(tempData.getValue()); + FormElementTextSingleLine temperature = new FormElementTextSingleLine().setTitle("Temperature (C) Change").setValue("0"); + tempVal = Double.parseDouble(temperature.getValue()); - FormElementTextSingleLine tubidity = new FormElementTextSingleLine().setTitle("Tubidity (NTU)"); - FormElementTextNumber tubidityData = FormElementTextNumber.createInstance(); - turbidityVal = Double.parseDouble(tubidityData.getValue()); + FormElementTextSingleLine tubidity = new FormElementTextSingleLine().setTitle("Tubidity (NTU)").setValue("0"); + turbidityVal = Double.parseDouble(tubidity.getValue()); - FormElementTextSingleLine pH = new FormElementTextSingleLine().setTitle("pH"); - FormElementTextNumber pHData = FormElementTextNumber.createInstance(); - phVal = Double.parseDouble(pHData.getValue()); + FormElementTextSingleLine pH = new FormElementTextSingleLine().setTitle("pH").setValue("0"); + phVal = Double.parseDouble(pH.getValue()); - FormElementTextSingleLine nitrate = new FormElementTextSingleLine().setTitle("Nitrate (mg/L)"); - FormElementTextNumber nitrateData = FormElementTextNumber.createInstance(); - nitrateVal = Double.parseDouble(nitrateData.getValue()); + FormElementTextSingleLine nitrate = new FormElementTextSingleLine().setTitle("Nitrate (mg/L)").setValue("0"); + nitrateVal = Double.parseDouble(nitrate.getValue()); - FormElementTextSingleLine phosphate = new FormElementTextSingleLine().setTitle("Total Phosphate (mg/L)"); - FormElementTextNumber phosphateData = FormElementTextNumber.createInstance(); - phosphateVal = Double.parseDouble(nitrateData.getValue()); + FormElementTextSingleLine phosphate = new FormElementTextSingleLine().setTitle("Total Phosphate (mg/L)").setValue("0"); + phosphateVal = Double.parseDouble(phosphate.getValue()); - FormElementTextSingleLine oxygen = new FormElementTextSingleLine().setTitle("Dissolved Oxygen (mg/L)"); - FormElementTextNumber oxygenData = FormElementTextNumber.createInstance(); - oxygenVal = Double.parseDouble(oxygenData.getValue()); + FormElementTextSingleLine oxygen = new FormElementTextSingleLine().setTitle("Dissolved Oxygen (mg/L)").setValue("0"); + oxygenVal = Double.parseDouble(oxygen.getValue()); - FormElementTextSingleLine coli = new FormElementTextSingleLine().setTitle("E Coli (col/100mL)"); - FormElementTextNumber coliData = FormElementTextNumber.createInstance(); - coliVal = Double.parseDouble(coliData.getValue()); + FormElementTextSingleLine coli = new FormElementTextSingleLine().setTitle("E Coli (col/100mL)").setValue("0"); + coliVal = Double.parseDouble(coli.getValue()); - FormElementTextSingleLine other1 = new FormElementTextSingleLine().setTitle("Other 1"); - FormElementTextNumber other1Data = FormElementTextNumber.createInstance(); - other1Val = Double.parseDouble(other1Data.getValue()); + FormElementTextSingleLine other1 = new FormElementTextSingleLine().setTitle("Other 1").setValue(""); + other1Val = Double.parseDouble(other1.getValue()); - FormElementTextSingleLine other2 = new FormElementTextSingleLine().setTitle("Other 2"); - FormElementTextNumber other2Data = FormElementTextNumber.createInstance(); + FormElementTextSingleLine other2 = new FormElementTextSingleLine().setTitle("Other 2").setValue(""); other2Val = Double.parseDouble(other2.getValue()); List formItems = new ArrayList<>(); formItems.add(title); formItems.add(temperature); - formItems.add(tempData); formItems.add(tubidity); - formItems.add(tubidityData); formItems.add(pH); - formItems.add(pHData); formItems.add(nitrate); - formItems.add(nitrateData); formItems.add(phosphate); - formItems.add(phosphateData); formItems.add(oxygen); - formItems.add(oxygenData); formItems.add(coli); - formItems.add(coliData); formItems.add(other1); - formItems.add(other1Data); formItems.add(other2); - formItems.add(other2Data); formBuilder.addFormElements(formItems); }