From a88a575e7c1b06b590899a9ab9336daae007b9d2 Mon Sep 17 00:00:00 2001 From: IvanaE Date: Tue, 13 Nov 2018 22:11:19 -0500 Subject: [PATCH] fixed sort of --- .../main/java/com/uottawa/olympus/olympusservices/DBHelper.java | 2 +- .../java/com/uottawa/olympus/olympusservices/SignUpPart2.java | 1 + .../main/res/layout/activity_service_provider_services_list.xml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/DBHelper.java b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/DBHelper.java index 78f609d..d7380bd 100644 --- a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/DBHelper.java +++ b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/DBHelper.java @@ -257,7 +257,7 @@ public class DBHelper extends SQLiteOpenHelper { } boolean licensed = serviceProvider.isLicensed(); - values.put(COLUMN_LICENSED, licensed); + values.put(COLUMN_LICENSED, Boolean.toString(licensed)); } diff --git a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/SignUpPart2.java b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/SignUpPart2.java index d3b4672..2473704 100644 --- a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/SignUpPart2.java +++ b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/SignUpPart2.java @@ -40,6 +40,7 @@ public class SignUpPart2 extends AppCompatActivity { ServiceProvider serviceProvider = new ServiceProvider(username, password, firstname, lastname, address, phonenumber, companyname, licensed); if(dbHelper.addUser(serviceProvider)){ + Toast.makeText(this, licensed+":"+((ServiceProvider)dbHelper.findUserByUsername(username)).isLicensed(), Toast.LENGTH_SHORT).show(); startActivity(intent); finish(); }else{ diff --git a/OlympusServices/app/src/main/res/layout/activity_service_provider_services_list.xml b/OlympusServices/app/src/main/res/layout/activity_service_provider_services_list.xml index c6ee9c6..5ff6921 100644 --- a/OlympusServices/app/src/main/res/layout/activity_service_provider_services_list.xml +++ b/OlympusServices/app/src/main/res/layout/activity_service_provider_services_list.xml @@ -82,7 +82,7 @@ android:layout_width="250dp" android:layout_height="48dp" android:layout_weight="1" - android:layout_marginTop="4dp"/> + android:layout_marginTop="5dp"/>