Skip to content

Commit

Permalink
Added map and completed Tolerant form to WaterWayFormFragment
Browse files Browse the repository at this point in the history
  • Loading branch information
jparrell committed Apr 10, 2021
1 parent d943741 commit 7c0a5e8
Showing 1 changed file with 38 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ public class WaterWayFormFragment extends Fragment {
double ripVal = 0.0;
double landVal = 0.0;
double bankVal = 0.0;
//Tolerant Form
double intolerantVal = 0.0;
double modTolerantVal = 0.0;
double fairTolerantVal = 0.0;
double veryTolerantVal = 0.0;
RecyclerView rvGen, rvDWS, rvHQ, rvBM,rvCT;
FormBuilder fbGEn,fbDWS,fbBM,fbHQ,fbCT;
SegmentedButton gen,dws,ct,bm,hq;
Expand Down Expand Up @@ -177,10 +182,10 @@ public void onClick(View v) {
WaterWayDoubleFields.put("CT_total_phosphate", phosphateVal);
WaterWayDoubleFields.put("CT_dissolved_oxygen", oxygenVal);
//PTI Data
WaterWayDoubleFields.put("BM_intolerant", new Double(0.0));
WaterWayDoubleFields.put("BM_moderately_tolerant", new Double(0.0));
WaterWayDoubleFields.put("BM_fairly_tolerant", new Double(0.0));
WaterWayDoubleFields.put("BM_very_tolerant", new Double(0.0));
WaterWayDoubleFields.put("BM_intolerant", intolerantVal);
WaterWayDoubleFields.put("BM_moderately_tolerant", modTolerantVal);
WaterWayDoubleFields.put("BM_fairly_tolerant", fairTolerantVal);
WaterWayDoubleFields.put("BM_very_tolerant", veryTolerantVal);

WaterWayDoubleFields.put("WQI", new Double(0.0));
WaterWayDoubleFields.put("HEI", new Double(0.0));
Expand Down Expand Up @@ -225,14 +230,14 @@ public void onClick(View v) {
WaterWayStringFields.put("QHEI_rifflerun_depth", "");
WaterWayStringFields.put("QHEI_rifflerun_substrate", "");

WaterWayStringFields.put("GOD_channel_bottom_width", "");
WaterWayStringFields.put("GOD_invert_elevation", "");
WaterWayStringFields.put("GOD_latitude", "");
WaterWayStringFields.put("GOD_longitude", "");
WaterWayStringFields.put("GOD_outfall", "");
WaterWayStringFields.put("GOD_pipe_size", "");
WaterWayStringFields.put("GOD_receiving_water", "");
WaterWayStringFields.put("GOD_type", "");
WaterWayStringFields.put("GOD_channel_bottom_width", channelBottomWidth);
WaterWayStringFields.put("GOD_invert_elevation", invertElevation);
WaterWayStringFields.put("GOD_latitude", latitude);
WaterWayStringFields.put("GOD_longitude", longitude);
WaterWayStringFields.put("GOD_outfall", outfall);
WaterWayStringFields.put("GOD_pipe_size", pipeSize);
WaterWayStringFields.put("GOD_receiving_water", receivingWater);
WaterWayStringFields.put("GOD_type", type);

//Comments
WaterWayStringFields.put("CS_comments", "");
Expand Down Expand Up @@ -580,7 +585,28 @@ private void setupFormDWS() {

fbDWS.addFormElements(formItemsDWS);
}
private void setupTolerantForm(){
formBuilder = new FormBuilder(this, recyclerView);

FormElementTextNumber intolerant = FormElementTextNumber.createInstance().setTitle("Intolerant").setValue("0");
FormElementTextNumber moderatelyTolerant = FormElementTextNumber.createInstance().setTitle("Moderately Tolerant").setValue("0");
FormElementTextNumber fairlyTolerant = FormElementTextNumber.createInstance().setTitle("Fairly Tolerant").setValue("0");
FormElementTextNumber veryTolerant = FormElementTextNumber.createInstance().setTitle("Very Tolerant").setValue("0");

List<BaseFormElement> formItems = new ArrayList<>();
formItems.add(intolerant);
formItems.add(moderatelyTolerant);
formItems.add(fairlyTolerant);
formItems.add(veryTolerant);

intolerantVal = Double.parseDouble(intolerant.getValue());
modTolerantVal = Double.parseDouble(moderatelyTolerant.getValue());
fairTolerantVal = Double.parseDouble(fairlyTolerant.getValue());
veryTolerantVal = Double.parseDouble(veryTolerant.getValue());



}
private void setupFormCT() {
boolct = true;
fbCT = new FormBuilder(getContext(), rvCT);
Expand Down

0 comments on commit 7c0a5e8

Please sign in to comment.