-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
IbrahimSaeedPurdue
authored and
IbrahimSaeedPurdue
committed
Feb 11, 2021
1 parent
5499e3a
commit 365613b
Showing
6 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 128 additions & 0 deletions
128
app/src/main/java/com/sf/stormwaterutilityandroid/InspectionForm.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
package com.sf.stormwaterutilityandroid; | ||
|
||
import android.os.Bundle; | ||
import android.widget.Button; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.recyclerview.widget.RecyclerView; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
import me.riddhimanadib.formmaster.FormBuilder; | ||
import me.riddhimanadib.formmaster.model.BaseFormElement; | ||
import me.riddhimanadib.formmaster.model.FormElementPickerDate; | ||
import me.riddhimanadib.formmaster.model.FormElementPickerMulti; | ||
import me.riddhimanadib.formmaster.model.FormElementPickerSingle; | ||
import me.riddhimanadib.formmaster.model.FormElementSwitch; | ||
import me.riddhimanadib.formmaster.model.FormElementTextEmail; | ||
import me.riddhimanadib.formmaster.model.FormElementTextMultiLine; | ||
import me.riddhimanadib.formmaster.model.FormElementTextPhone; | ||
import me.riddhimanadib.formmaster.model.FormElementTextSingleLine; | ||
import me.riddhimanadib.formmaster.model.FormHeader; | ||
|
||
public class InspectionForm extends AppCompatActivity { | ||
private FormBuilder formBuilder; | ||
private RecyclerView recyclerView; | ||
|
||
@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); | ||
|
||
|
||
|
||
FormElementTextSingleLine projectTextField = FormElementTextSingleLine.createInstance().setTitle("Project/Contact:").setHint("Enter text here"); | ||
FormElementTextSingleLine addressTextField = FormElementTextSingleLine.createInstance().setTitle("Address/Lot#(s):").setHint("Enter text here"); | ||
FormElementTextSingleLine inspectorTextField = FormElementTextSingleLine.createInstance().setTitle("Inspector:").setHint("Enter name here"); | ||
FormElementPickerDate dataInspectedDatePicker = FormElementPickerDate.createInstance().setTitle("Date Inspected:").setDateFormat("MMM dd, yyyy"); | ||
|
||
|
||
List<String> typeOptions = new ArrayList<>(Arrays.asList( | ||
"Routine Evaluation", | ||
"Re-Inspection", | ||
"Complaint Investigation", | ||
"Entire Development", | ||
"Individual Building Lot(s)" | ||
)); | ||
FormElementPickerSingle inspectionTypePickerSingle = FormElementPickerSingle.createInstance().setTitle("Inspection type:").setOptions(typeOptions).setPickerTitle("Pick inspection type"); | ||
|
||
FormElementSwitch projectRepPresentSwitch = FormElementSwitch.createInstance().setTitle("Project Representative Present?").setSwitchTexts("Yes", "No"); | ||
|
||
FormHeader stakeholdersHeader = FormHeader.createInstance("THE FOLLOWING INDIVIDUALS BECAME AWARE OF ANY ISSUES THOUGH DISCUSSION AND REVIEW OF FINDINGS ON THE DAY OF INSPECTION:"); | ||
FormElementTextSingleLine projectManagerTextField = FormElementTextSingleLine.createInstance().setTitle("Project Manager:").setHint("Enter name here"); | ||
FormElementTextSingleLine siteManagerTextField = FormElementTextSingleLine.createInstance().setTitle("Site Manager:").setHint("Enter name here"); | ||
FormElementTextSingleLine projectOwnerTextField = FormElementTextSingleLine.createInstance().setTitle("Project Owner").setHint("Enter name here"); | ||
|
||
|
||
FormHeader correctiveActionsHeader = FormHeader.createInstance("CORRECTIVE ACTIONS REQUIRED\n***REDER TO APPROVED STORM WATER POLLUTION PREVENTION PLAN (SWP3) FOR SPECIFICATIONS AND DETAILS ON ITEMS BELOW***"); | ||
List<String> correctiveActionsOptions= new ArrayList<>(Arrays.asList( | ||
"Post a laminated copy of completed 327IAC15-5 \"Rule 5\" NOI with permit number at a location visible to the public", | ||
"Remove accumulated sediment from streets sidewalks and gutters (do not flush with water)", | ||
"Install/maintain stable temporary construction entrances(s)", "Entire Development", | ||
"Individual Building Lot(s)", | ||
"Address silt fence issues which includes one or more of the following: Repair, install properly, Replace, Add (areas prone to sheet-flow erosion)", | ||
"Install erosions and sediment control for individual building lot(s) as specified in the approved SWP3", | ||
"Install check dam(s) according to specifications", | ||
"Utilize appropriate construction sequence as specified in the approved SWP3", | ||
"Remove sediment from one or more of the following: sediment traps, behind check dams, around storm drain inlets or/and other", | ||
"Inform Contractors, subcontractors, material vendors, and others or erosion and sediment control requirements", | ||
"Provide copy and self-monitoring inspection records to MS Coordinator within 48 hours", | ||
"Acquire copy of Storm Water Pollution Prevention Plan and retain on project site for reference" | ||
)); | ||
FormElementPickerMulti correctiveActionsPickerMulti = FormElementPickerMulti.createInstance().setTitle("Corrective Actions").setOptions(correctiveActionsOptions).setPickerTitle("Pick corrective action"); | ||
|
||
FormElementTextMultiLine otherCorrectiveAction1TextField = FormElementTextMultiLine.createInstance().setTitle("Other 1:").setHint("Enter text here"); | ||
FormElementTextMultiLine otherCorrectiveAction2TextField = FormElementTextMultiLine.createInstance().setTitle("Other 2:").setHint("Enter text here"); | ||
FormElementTextMultiLine otherCorrectiveAction3TextField = FormElementTextMultiLine.createInstance().setTitle("Other 3:").setHint("Enter text here"); | ||
|
||
|
||
FormHeader enforcementActionHeader = FormHeader.createInstance("ENFORCEMENT ACTIONS"); | ||
List<String> enforcementActionOptions = new ArrayList<>(Arrays.asList( | ||
"Notice of Violation Issued", | ||
"Stop Work Order Issued", | ||
"Fine(s) Issued", | ||
"Other" | ||
)); | ||
FormElementPickerSingle enforcementActionPickerSingle = FormElementPickerSingle.createInstance().setTitle("Inspection type:").setOptions(enforcementActionOptions).setPickerTitle("Pick inspection type"); | ||
|
||
FormElementTextMultiLine evidenceTextField = FormElementTextMultiLine.createInstance().setTitle("Evidence of off-site sediment/pollutants.\nHere is a description of type and location:").setHint("Enter text here"); | ||
|
||
List<BaseFormElement> formItems = new ArrayList<>(); | ||
|
||
formItems.add(projectTextField); | ||
formItems.add(addressTextField); | ||
formItems.add(inspectorTextField); | ||
formItems.add(dataInspectedDatePicker); | ||
|
||
formItems.add(inspectionTypePickerSingle); | ||
formItems.add(projectRepPresentSwitch); | ||
|
||
formItems.add(stakeholdersHeader); | ||
formItems.add(projectManagerTextField); | ||
formItems.add(siteManagerTextField); | ||
formItems.add(projectOwnerTextField); | ||
|
||
formItems.add(correctiveActionsHeader); | ||
formItems.add(correctiveActionsPickerMulti); | ||
formItems.add(otherCorrectiveAction1TextField); | ||
formItems.add(otherCorrectiveAction2TextField); | ||
formItems.add(otherCorrectiveAction3TextField); | ||
|
||
formItems.add(enforcementActionHeader); | ||
formItems.add(enforcementActionPickerSingle); | ||
|
||
formItems.add(evidenceTextField); | ||
|
||
formBuilder.addFormElements(formItems); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters