diff --git a/app/src/main/java/com/sf/stormwaterutilityandroid/DryWeatherScreening.java b/app/src/main/java/com/sf/stormwaterutilityandroid/DryWeatherScreening.java index 45b04c0..2bd9d01 100644 --- a/app/src/main/java/com/sf/stormwaterutilityandroid/DryWeatherScreening.java +++ b/app/src/main/java/com/sf/stormwaterutilityandroid/DryWeatherScreening.java @@ -56,31 +56,30 @@ private void setupForm() { formBuilder = new FormBuilder(this, recyclerView); FormHeader title = (FormHeader) new FormHeader().setTitle("Dry Weather Screening"); - FormElementTextSingleLine flow = FormElementTextSingleLine.createInstance().setTitle("Presence of Flow").setValue("No"); - flowVal = flow.getValue(); - flowPres = convertToBoolean(flowVal); + FormElementSwitch flow = FormElementSwitch.createInstance().setTitle("Presence of Flow").setSwitchTexts("Yes", "No"); + flowPres = convertToBoolean(flow.getValue()); - FormElementTextSingleLine odor = FormElementTextSingleLine.createInstance().setTitle("Unusual Odor").setValue("No"); + FormElementSwitch odor = FormElementSwitch.createInstance().setTitle("Unusual Odor").setSwitchTexts("Yes", "No"); odorVal = odor.getValue(); odorPres = convertToBoolean(odorVal); - FormElementTextSingleLine color = FormElementTextSingleLine.createInstance().setTitle("Unusual Color").setValue("No"); + FormElementSwitch color = FormElementSwitch.createInstance().setTitle("Unusual Color").setSwitchTexts("Yes", "No"); colorVal = color.getValue(); colorPres = convertToBoolean(colorVal); - FormElementTextSingleLine polutants = FormElementTextSingleLine.createInstance().setTitle("Polutants Nearby").setValue("No"); + FormElementSwitch polutants = FormElementSwitch.createInstance().setTitle("Polutants Nearby").setSwitchTexts("Yes", "No"); polutantsVal = polutants.getValue(); - polutantsPres = convertToBoolean(polutantsVal) + polutantsPres = convertToBoolean(polutantsVal); - FormElementTextSingleLine obstruction = FormElementTextSingleLine.createInstance().setTitle("Obstruction").setValue("No"); + FormElementSwitch obstruction = FormElementSwitch.createInstance().setTitle("Obstruction").setSwitchTexts("Yes", "No"); obstructionVal = obstruction.getValue(); obstructionPres = convertToBoolean(obstructionVal); - FormElementTextSingleLine maintenance = FormElementTextSingleLine.createInstance().setTitle("Needs Maintenance").setValue("No"); + FormElementSwitch maintenance = FormElementSwitch.createInstance().setTitle("Needs Maintenance").setSwitchTexts("Yes", "No"); maintenanceVal = maintenance.getValue(); needMaintenance = convertToBoolean(maintenanceVal); - FormElementTextSingleLine screen = FormElementTextSingleLine.createInstance().setTitle("Screen OK").setValue("No"); + FormElementSwitch screen = FormElementSwitch.createInstance().setTitle("Screen OK").setSwitchTexts("Yes", "No"); screenVal = screen.getValue(); screenOK = convertToBoolean(screenVal); diff --git a/app/src/main/java/com/sf/stormwaterutilityandroid/WaterWay/General.java b/app/src/main/java/com/sf/stormwaterutilityandroid/WaterWay/General.java index da1e6a5..4c53de8 100644 --- a/app/src/main/java/com/sf/stormwaterutilityandroid/WaterWay/General.java +++ b/app/src/main/java/com/sf/stormwaterutilityandroid/WaterWay/General.java @@ -48,12 +48,13 @@ public class General { String comments = ""; - /*protected void onCreate(Bundle savedInstanceState) { + @Override + protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sample_fordm); recyclerView = findViewById(R.id.recyclerView2); setupForm(); - }*/ + } private void setupForm() { formBuilder = new FormBuilder(this, recyclerView); @@ -81,19 +82,56 @@ private void setupForm() { FormElementTextSingleLine invertElevationValue = FormElementTextSingleLine.createInstance().setTitle("Invert Elevation").setValue("0"); invertElevation = Double.parseDouble(invertElevationValue.getValue()); - FormElementTextSingleLine typeValue = FormElementTextSingleLine.createInstance().setTitle("Type").setValue(""); + List pipeTypeOptions = new ArrayList(); + pipeTypeOptions.add("Enclosed Pipe"); + pipeTypeOptions.add("Open Channel"); + FormElementPickerSingle typeValue = FormElementPickerSingle.createInstance().setTitle("Type").setOptions(pipeTypeOptions); type = typeValue.getValue(); - FormElementTextSingleLine pipeSizeValue = FormElementTextSingleLine.createInstance().setTitle("Pipe Size").setValue(""); + List pipeSizeOptions = new ArrayList(); + pipeSizeOptions.add("4\""); + pipeSizeOptions.add("6\""); + pipeSizeOptions.add("8\""); + pipeSizeOptions.add("10\""); + pipeSizeOptions.add("12\""); + pipeSizeOptions.add("14\""); + pipeSizeOptions.add("16\""); + pipeSizeOptions.add("18\""); + pipeSizeOptions.add("20\""); + pipeSizeOptions.add("24\""); + pipeSizeOptions.add("36\""); + FormElementPickerSingle pipeSizeValue = FormElementPickerSingle.createInstance().setTitle("Pipe Size").setOptions(pipeSizeOptions); pipeSize = pipeSizeValue.getValue(); - FormElementTextSingleLine channelBottomWidthValue = FormElementTextSingleLine.createInstance().setTitle("Channel Bottom Width") - .setValue(""); + List channelWidthOptions = new ArrayList receivingWaterOptions = new ArrayList(); + receivingWaterOptions.add("Turkey Creek"); + receivingWaterOptions.add("Deep River"); + receivingWaterOptions.add("Un-Named Tributary"); + receivingWaterOptions.add("Spring Run Ditch"); + receivingWaterOptions.add("Hart Ditch"); + receivingWaterOptions.add("Coffee Creek"); + receivingWaterOptions.add("Niles Ditch"); + receivingWaterOptions.add("Beaver Dam Ditch"); + receivingWaterOptions.add("Kaiser Ditch"); + + FormElementPickerSingle receiving = FormElementPickerSingle.createInstance().setTitle("Receiving Water").setOptions(receivingWaterOptions); receivingWater = receiving.getValue(); - + /* FormElementTextSingleLine routine = FormElementTextSingleLine.createInstance().setTitle("Routine Evaluation").setValue(""); routineEvaluation = routine.getValue(); @@ -101,7 +139,7 @@ private void setupForm() { complaintInvestigation = complaint.getValue(); FormElementTextSingleLine commentsValue = FormElementTextSingleLine.createInstance().setTitle("Comments").setValue(""); - comments = commentsValue.getValue(); + comments = commentsValue.getValue();*/ } public String getName() { @@ -148,7 +186,7 @@ public String getReceivingWater() { return receivingWater; } - public String getRoutineEvaluation() { + /*public String getRoutineEvaluation() { return routineEvaluation; } @@ -158,5 +196,5 @@ public String getComplaintInvestigation() { public String getComments() { return comments; - } + }*/ }