Skip to content

Commit

Permalink
Added tolerant form with retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
jparrell committed Mar 23, 2021
1 parent b63383e commit 39ba0fe
Showing 1 changed file with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,21 @@ public class WaterWayForm extends AppCompatActivity {
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;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sample_fordm);
recyclerView = findViewById(R.id.recyclerView2);
setupForm();
setupHQForm();
}

private void setupForm() {
private void setupHQForm() {

formBuilder = new FormBuilder(this, recyclerView);
FormElementTextNumber subSize = FormElementTextNumber.createInstance().setTitle("Substrate Size").setValue("0");
Expand Down Expand Up @@ -112,5 +118,26 @@ private void setupForm() {
bankVal = Double.parseDouble(bankErosion.getValue());


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



}
}

0 comments on commit 39ba0fe

Please sign in to comment.