-
Notifications
You must be signed in to change notification settings - Fork 0
Merged
Evan #14
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
bb28e54
Fixed extra fields
will2312 2ed4a46
generalf orm
will2312 4bd7003
More changes to general
will2312 38316bf
Fixed the valeus to booleans instead of doubles or integers
will2312 60ec652
Merge branch 'master' into Evan
seford ca14a7a
Switched most text fields to pickers
will2312 e774cf6
fixed General to use multi-picker
will2312 87264ef
work in progress
will2312 6b88870
fixed problems
will2312 0c62627
fixed chemical form
will2312 a7c03b9
copied form code into the form fragment
will2312 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
162 changes: 162 additions & 0 deletions
162
app/src/main/java/com/sf/stormwaterutilityandroid/WaterWay/General.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,162 @@ | ||
package com.sf.stormwaterutilityandroid.WaterWay; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.recyclerview.widget.RecyclerView; | ||
|
||
import com.sf.stormwaterutilityandroid.R; | ||
|
||
import java.util.ArrayList; | ||
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.FormElementPickerTime; | ||
import me.riddhimanadib.formmaster.model.FormElementSwitch; | ||
import me.riddhimanadib.formmaster.model.FormElementTextEmail; | ||
import me.riddhimanadib.formmaster.model.FormElementTextMultiLine; | ||
import me.riddhimanadib.formmaster.model.FormElementTextNumber; | ||
import me.riddhimanadib.formmaster.model.FormElementTextPassword; | ||
import me.riddhimanadib.formmaster.model.FormElementTextPhone; | ||
import me.riddhimanadib.formmaster.model.FormElementTextSingleLine; | ||
import me.riddhimanadib.formmaster.model.FormHeader; | ||
|
||
public class General { | ||
//HQ form | ||
private FormBuilder formBuilder; | ||
private RecyclerView recyclerView; | ||
|
||
String nameOfInspector = ""; | ||
String nameOfSite = ""; | ||
String dateRow = ""; | ||
|
||
double outfall = 0.0; | ||
double longitude = 0.0; | ||
double latitude = 0.0; | ||
double invertElevation = 0.0; | ||
|
||
String type = ""; | ||
String pipeSize = ""; | ||
String channelBottomWidth = ""; | ||
String receivingWater = ""; | ||
String routineEvaluation = ""; | ||
String complaintInvestigation = ""; | ||
|
||
String comments = ""; | ||
|
||
/*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); | ||
|
||
FormHeader title = (FormHeader) new FormHeader().setTitle("Report"); | ||
|
||
FormElementTextSingleLine name = FormElementTextSingleLine.createInstance().setTitle("Name of Inspector").setValue(""); | ||
nameOfInspector = name.getValue(); | ||
|
||
FormElementTextSingleLine site = FormElementTextSingleLine.createInstance().setTitle("Name of site").setValue(""); | ||
nameOfSite = site.getValue(); | ||
|
||
FormElementPickerDate date = FormElementPickerDate.createInstance().setTitle("Date Row").setDateFormat("XX-XX-XXXX").setValue(""); | ||
dateRow = date.getValue(); | ||
|
||
FormElementTextSingleLine outfallValue = FormElementTextSingleLine.createInstance().setTitle("Outfall").setValue("0"); | ||
outfall = Double.parseDouble(outfallValue.getValue()); | ||
|
||
FormElementTextSingleLine longitudeValue = FormElementTextSingleLine.createInstance().setTitle("Longitude").setValue("0"); | ||
longitude = Double.parseDouble(longitudeValue.getValue()); | ||
|
||
FormElementTextSingleLine latitudeValue = FormElementTextSingleLine.createInstance().setTitle("Latitude").setValue("0"); | ||
latitude = Double.parseDouble(latitudeValue.getValue()); | ||
|
||
FormElementTextSingleLine invertElevationValue = FormElementTextSingleLine.createInstance().setTitle("Invert Elevation").setValue("0"); | ||
invertElevation = Double.parseDouble(invertElevationValue.getValue()); | ||
|
||
FormElementTextSingleLine typeValue = FormElementTextSingleLine.createInstance().setTitle("Type").setValue(""); | ||
type = typeValue.getValue(); | ||
|
||
FormElementTextSingleLine pipeSizeValue = FormElementTextSingleLine.createInstance().setTitle("Pipe Size").setValue(""); | ||
pipeSize = pipeSizeValue.getValue(); | ||
|
||
FormElementTextSingleLine channelBottomWidthValue = FormElementTextSingleLine.createInstance().setTitle("Channel Bottom Width") | ||
will2312 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.setValue(""); | ||
channelBottomWidth = channelBottomWidthValue.getValue(); | ||
|
||
FormElementTextSingleLine receiving = FormElementTextSingleLine.createInstance().setTitle("Receiving Water").setValue(""); | ||
receivingWater = receiving.getValue(); | ||
|
||
FormElementTextSingleLine routine = FormElementTextSingleLine.createInstance().setTitle("Routine Evaluation").setValue(""); | ||
routineEvaluation = routine.getValue(); | ||
|
||
FormElementTextSingleLine complaint = FormElementTextSingleLine.createInstance().setTitle("Complaint Investigation").setValue(""); | ||
complaintInvestigation = complaint.getValue(); | ||
|
||
FormElementTextSingleLine commentsValue = FormElementTextSingleLine.createInstance().setTitle("Comments").setValue(""); | ||
comments = commentsValue.getValue(); | ||
} | ||
|
||
public String getName() { | ||
return nameOfInspector; | ||
} | ||
|
||
public String getSite() { | ||
return nameOfSite; | ||
} | ||
|
||
public String getDate() { | ||
return dateRow; | ||
} | ||
|
||
public double getOutfall() { | ||
return outfall; | ||
} | ||
|
||
public double getLongitude() { | ||
return longitude; | ||
} | ||
|
||
public double getLatitude() { | ||
return latitude; | ||
} | ||
|
||
public double getInvertElevation() { | ||
return invertElevation; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public String getPipeSize() { | ||
return pipeSize; | ||
} | ||
|
||
public String getChannelBottomWidth() { | ||
return channelBottomWidth; | ||
} | ||
|
||
public String getReceivingWater() { | ||
return receivingWater; | ||
} | ||
|
||
public String getRoutineEvaluation() { | ||
return routineEvaluation; | ||
} | ||
|
||
public String getComplaintInvestigation() { | ||
return complaintInvestigation; | ||
} | ||
|
||
public String getComments() { | ||
return comments; | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of these classes should be separate. The form parts should go in the setup methods in the Waterway form frgment. Please read through the code and run it, so you can understand what it is doing. It is very trivial to understand it once you run it and look at the code.