diff --git a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/EditProfile.java b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/EditProfile.java
index ebc3d41..3fd358d 100644
--- a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/EditProfile.java
+++ b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/EditProfile.java
@@ -27,6 +27,7 @@ public class EditProfile extends AppCompatActivity {
TextView companyname = findViewById(R.id.CompanyNameInput);
TextView address = findViewById(R.id.AddressInput);
TextView phonenumber = findViewById(R.id.PhoneNumberInput);
+ TextView description = findViewById(R.id.DescriptionInput);
CheckBox licensed = findViewById(R.id.LicensedInput);
@@ -36,9 +37,11 @@ public class EditProfile extends AppCompatActivity {
companyname.setText(user.getCompanyname());
address.setText(user.getAddress());
phonenumber.setText(user.getPhonenumber());
+ description.setText(user.getDescription());
licensed.setChecked(user.isLicensed());
+
}
/**
@@ -60,6 +63,7 @@ public class EditProfile extends AppCompatActivity {
TextView companyname = findViewById(R.id.CompanyNameInput);
TextView address = findViewById(R.id.AddressInput);
TextView phonenumber = findViewById(R.id.PhoneNumberInput);
+ TextView description = findViewById(R.id.DescriptionInput);
CheckBox licensed = findViewById(R.id.LicensedInput);
if(password.getText().toString().length()>=5 && firstname.getText().toString().length()>0
@@ -70,11 +74,13 @@ public class EditProfile extends AppCompatActivity {
&& lastname.getText().toString().matches("[a-zA-Z]*")
&& companyname.getText().toString().matches("^[a-zA-Z0-9_ ]*$")
&& address.getText().toString().matches("^[a-zA-Z0-9_ ]*$")
+ && description.getText().toString().matches("^[a-zA-Z0-9_ ]*$")
&& phonenumber.getText().toString().matches("^(\\+\\d{1,2}\\s)?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$")
&& address.getText().toString().replaceAll("\\s+","").length()>0) {
if(dbHelper.updateUserInfo(username, password.getText().toString(), firstname.getText().toString(), lastname.getText().toString(),
address.getText().toString(), phonenumber.getText().toString(), companyname.getText().toString(), licensed.isChecked())){
+ //add comment method here
Toast.makeText(this, "Profile has been updated", Toast.LENGTH_LONG).show();
}
else{
diff --git a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/ServiceProvider.java b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/ServiceProvider.java
index f339e6f..170d788 100644
--- a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/ServiceProvider.java
+++ b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/ServiceProvider.java
@@ -142,6 +142,7 @@ public class ServiceProvider extends UserType {
this.licensed = licensed;
}
+<<<<<<< HEAD
public String getDescription() {
return description;
}
@@ -149,4 +150,10 @@ public class ServiceProvider extends UserType {
public void setDescription(String phonenumber) {
this.description = description;
}
+=======
+
+ public String getDescription() {return description; }
+
+ public void setDescription(String description) { this.description = description; }
+>>>>>>> 587e99040b46bc068178844c11165b0730c21628
}
\ No newline at end of file
diff --git a/OlympusServices/app/src/main/res/layout/activity_edit_profile.xml b/OlympusServices/app/src/main/res/layout/activity_edit_profile.xml
index e9a8800..1ba8447 100644
--- a/OlympusServices/app/src/main/res/layout/activity_edit_profile.xml
+++ b/OlympusServices/app/src/main/res/layout/activity_edit_profile.xml
@@ -105,6 +105,20 @@
android:buttonTint="@color/colorWhite"
android:layout_marginBottom="15dp"/>
+ //component used from https://github.com/rengwuxian/MaterialEditText
+
+
//component used from https://github.com/rengwuxian/MaterialEditText