Skip to content

Commit

Permalink
Merge branch 'master' into Samuel
Browse files Browse the repository at this point in the history
  • Loading branch information
seford authored Mar 17, 2021
2 parents b4b66bd + 2b71cd7 commit ae22a6f
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 14 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
</activity>
<activity
android:name=".WaterWay.WaterWayNav"
>
>
</activity>
<activity android:name=".Construction.ConstructionNav">

</activity>
<activity android:name=".Reset_password" />
<activity android:name=".SampleFordm" />
<activity android:name=".InspectionForm" />
<activity android:name=".Login" />
<activity android:name=".SignUp" />
</application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,49 @@
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.RecyclerView;

import com.google.firebase.Timestamp;
import com.google.type.DateTime;
import com.sf.stormwaterutilityandroid.R;

import org.json.JSONException;
import org.json.JSONObject;

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.FormElementTextMultiLine;
import me.riddhimanadib.formmaster.model.FormElementTextSingleLine;
import me.riddhimanadib.formmaster.model.FormHeader;

public class ConstructionFormFragment extends Fragment {
private FormBuilder formBuilder;
private RecyclerView recyclerView;
private Button submitButton;

public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.activity_sample_fordm, container, false);

View root = inflater.inflate(R.layout.fragment_home, container, false);
recyclerView = root.findViewById(R.id.recyclerView2);

return root;
recyclerView.addView(submitButton);

return root;
}


}
9 changes: 7 additions & 2 deletions app/src/main/java/com/sf/stormwaterutilityandroid/HEI.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ public class HEI {

//constructor
HEI(double QHEI_substrate_size, double QHEI_smothering, double QHEI_silting, double QHEI_rootwads, double QHEI_overhanging_veg,
double QHEI_oxbowsblack_waters, double QHEI_downed_treeslogs, double QHEI_shallows, double QHEI_water_plants, double QHEI_logswoody_debris,


double QHEI_oxbowsblack_waters, double QHEI_downed_treeslogs, double QHEI_shallows, double QHEI_water_plants, double QHEI_logswoody_debris,

double QHEI_boulders, double QHEI_undercut_banks, double QHEI_sinuosity, double QHEI_natural, double QHEI_riparian_width,
double QHEI_land_use, double QHEI_bank_erosion, double QHEI_stream_shading, double QHEI_deepest_pool, double QHEI_velocity,
double QHEI_rifflerun_depth, double QHEI_rifflerun_substrate, double QHEI_deep_pools) {
Expand Down Expand Up @@ -79,4 +82,6 @@ public static double get_HEI(double QHEI_substrate_size, double QHEI_smothering,
QHEI_velocity + QHEI_rifflerun_depth + QHEI_rifflerun_substrate;
}

}

}

Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ protected void onCreate(Bundle savedInstanceState) {

// submitButton = findViewById(R.id.submitButton);


setupForm();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ public double calculatePTI() {
public static double getPTI(double intolerant, double moderate, double fairly, double very) {
return 4.0 * intolerant + 3.0 * moderate + 2.0 * fairly + 1.0 * very;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ public double calculateWQI() {
public static double getWQI(double tempChange, double turbidity, double pH, double nitrate, double phosphate, double oxygen) {
return tempChange * 0.11 + turbidity * 0.09 + pH * 0.12 + nitrate * 0.1 + phosphate * 0.11 + oxygen * 0.18;
}
}

}

}

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;

import com.sf.stormwaterutilityandroid.InspectionForm;
import com.sf.stormwaterutilityandroid.R;
import com.sf.stormwaterutilityandroid.SampleFordm;

Expand All @@ -31,6 +32,15 @@ public void onClick(View view) {
}
});

b1 = root.findViewById(R.id.button2);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(getContext(), InspectionForm.class));
}
});


//CHeck To5a.03 project for dealing saved instance state
/*
if (savedInstanceState != null) {
Expand Down
24 changes: 21 additions & 3 deletions app/src/main/res/layout/activity_sample_fordm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,27 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SampleFordm">

<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/recyclerView2"/>
android:id="@+id/recyclerView2"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toTopOf="@+id/submitButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<Button
android:id="@+id/submitButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:text="Submit"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/recyclerView2" />

</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@
<string name="title_activity_water_way">WaterWay
</string>

<!-- Inspection form strings-->

</resources>
10 changes: 8 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ buildscript {
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.1"
classpath 'com.google.gms:google-services:4.3.4'



classpath 'com.google.gms:google-services:4.3.5'

classpath 'com.android.tools.build:gradle:4.1.2'



// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down

0 comments on commit ae22a6f

Please sign in to comment.