Browse Source

Transfert

Loquicom 4 years ago
commit
0beac352f7
100 changed files with 6396 additions and 0 deletions
  1. 5 0
      README.md
  2. 14 0
      android/.gitignore
  3. 116 0
      android/.idea/codeStyles/Project.xml
  4. 21 0
      android/.idea/gradle.xml
  5. 9 0
      android/.idea/misc.xml
  6. 6 0
      android/.idea/render.experimental.xml
  7. 12 0
      android/.idea/runConfigurations.xml
  8. 6 0
      android/.idea/vcs.xml
  9. 34 0
      android/Fonctionnalités.md
  10. 111 0
      android/README.md
  11. 1 0
      android/app/.gitignore
  12. 57 0
      android/app/build.gradle
  13. 21 0
      android/app/proguard-rules.pro
  14. 27 0
      android/app/src/androidTest/java/com/androiddev/project/ili/wishurgift/ExampleInstrumentedTest.java
  15. 41 0
      android/app/src/main/AndroidManifest.xml
  16. BIN
      android/app/src/main/ic_launcher-playstore.png
  17. BIN
      android/app/src/main/ic_launcher-web.png
  18. 116 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/.idea/codeStyles/Project.xml
  19. 8 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/.idea/modules.xml
  20. 6 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/.idea/vcs.xml
  21. 93 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/.idea/workspace.xml
  22. 210 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/FingerAuthentification/FingerprintDialog.java
  23. 91 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/FingerAuthentification/FingerprintHelper.java
  24. 252 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/activities/AppMainActivity.java
  25. 35 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/activities/ForgotPasswordActivity.java
  26. 200 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/activities/LoginActivity.java
  27. 101 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/activities/MainActivity.java
  28. 135 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/activities/RegisterActivity.java
  29. 157 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/CommentaireAdapter.java
  30. 75 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/ContactAdapter.java
  31. 78 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/ContactPendingAdapter.java
  32. 77 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/ContactSearchAdapter.java
  33. 75 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/ElementAdapter.java
  34. 41 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/ShareUserAdapter.java
  35. 121 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/WishListAdapter.java
  36. 39 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/WishSharedAdapter.java
  37. 109 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/AppelApi.java
  38. 42 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/CommentApi.java
  39. 60 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/ContactsApi.java
  40. 76 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/ElementsApi.java
  41. 17 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/StatsApi.java
  42. 96 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/UserApi.java
  43. 80 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/WishListApi.java
  44. 38 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/application/Wishurgift.java
  45. 131 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/AddContactsFragment.java
  46. 176 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/AddElementFragment.java
  47. 128 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/AddWishListFragment.java
  48. 199 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/EditElementFragment.java
  49. 157 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/EditProfilFragment.java
  50. 273 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/ElementFragment.java
  51. 251 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/ListeContactsFragment.java
  52. 187 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/MyListFragment.java
  53. 160 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/ProfilFragment.java
  54. 261 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/SettingsFragment.java
  55. 154 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/ShareListFragment.java
  56. 167 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/ShowContactDetails.java
  57. 191 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/WishListContentFragment.java
  58. 72 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/dummy/DummyContent.java
  59. 47 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/Commentaire.java
  60. 133 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/ContactStats.java
  61. 89 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/Element.java
  62. 41 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/Image.java
  63. 108 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/User.java
  64. 61 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/WishList.java
  65. 64 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/WishListContent.java
  66. 27 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/WishStats.java
  67. 91 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/util/Constants.java
  68. 27 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/util/NonScrollListView.java
  69. 26 0
      android/app/src/main/java/com/androiddev/project/ili/wishurgift/util/SessionVariables.java
  70. 18 0
      android/app/src/main/res/anim/bottom_animantion.xml
  71. 16 0
      android/app/src/main/res/anim/middle_animantion.xml
  72. 4 0
      android/app/src/main/res/anim/slide_in_left.xml
  73. 4 0
      android/app/src/main/res/anim/slide_in_right.xml
  74. 5 0
      android/app/src/main/res/anim/stay.xml
  75. 18 0
      android/app/src/main/res/anim/top_animantion.xml
  76. 17 0
      android/app/src/main/res/drawable-v24/button_background_blue.xml
  77. BIN
      android/app/src/main/res/drawable-v24/ic_address.png
  78. BIN
      android/app/src/main/res/drawable-v24/ic_dob.png
  79. BIN
      android/app/src/main/res/drawable-v24/ic_email.png
  80. 3 0
      android/app/src/main/res/drawable-v24/ic_fingerprint_white_24dp.xml
  81. BIN
      android/app/src/main/res/drawable-v24/ic_mobile.png
  82. BIN
      android/app/src/main/res/drawable-v24/ic_name.png
  83. 10 0
      android/app/src/main/res/drawable-v24/profile_bk.xml
  84. 12 0
      android/app/src/main/res/drawable/bg.xml
  85. 9 0
      android/app/src/main/res/drawable/boarder.xml
  86. 28 0
      android/app/src/main/res/drawable/button.xml
  87. BIN
      android/app/src/main/res/drawable/cad.png
  88. 8 0
      android/app/src/main/res/drawable/edit_text_background.xml
  89. 11 0
      android/app/src/main/res/drawable/edit_text_bottom.xml
  90. 10 0
      android/app/src/main/res/drawable/edit_text_middle.xml
  91. 11 0
      android/app/src/main/res/drawable/edit_text_top.xml
  92. 9 0
      android/app/src/main/res/drawable/ic_about.xml
  93. 5 0
      android/app/src/main/res/drawable/ic_add_box_black_24dp.xml
  94. 12 0
      android/app/src/main/res/drawable/ic_add_img.xml
  95. 12 0
      android/app/src/main/res/drawable/ic_back_img.xml
  96. 9 0
      android/app/src/main/res/drawable/ic_contact.xml
  97. 12 0
      android/app/src/main/res/drawable/ic_dark_mode.xml
  98. 9 0
      android/app/src/main/res/drawable/ic_dashboard.xml
  99. 5 0
      android/app/src/main/res/drawable/ic_delete_forever_black_24dp.xml
  100. 9 0
      android/app/src/main/res/drawable/ic_edit_black_24dp.xml

+ 5 - 0
README.md

@@ -0,0 +1,5 @@
+# Wishurgift
+
+Application de liste de souhait et de cadeau.
+
+Projet de Java/JEE et mobilité (Android) du semestre 4 du master 2 ILI 2019-2020 de l'université d'Artois à la faculté Jean-Perrin de Lens.

+ 14 - 0
android/.gitignore

@@ -0,0 +1,14 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
+.cxx

+ 116 - 0
android/.idea/codeStyles/Project.xml

@@ -0,0 +1,116 @@
+<component name="ProjectCodeStyleConfiguration">
+  <code_scheme name="Project" version="173">
+    <codeStyleSettings language="XML">
+      <indentOptions>
+        <option name="CONTINUATION_INDENT_SIZE" value="4" />
+      </indentOptions>
+      <arrangement>
+        <rules>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>xmlns:android</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>xmlns:.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>BY_NAME</order>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*:id</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*:name</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>name</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>style</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>BY_NAME</order>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>ANDROID_ATTRIBUTE_ORDER</order>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>.*</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>BY_NAME</order>
+            </rule>
+          </section>
+        </rules>
+      </arrangement>
+    </codeStyleSettings>
+  </code_scheme>
+</component>

+ 21 - 0
android/.idea/gradle.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="GradleMigrationSettings" migrationVersion="1" />
+  <component name="GradleSettings">
+    <option name="linkedExternalProjectsSettings">
+      <GradleProjectSettings>
+        <option name="delegatedBuild" value="false" />
+        <option name="testRunner" value="PLATFORM" />
+        <option name="distributionType" value="DEFAULT_WRAPPED" />
+        <option name="externalProjectPath" value="$PROJECT_DIR$" />
+        <option name="modules">
+          <set>
+            <option value="$PROJECT_DIR$" />
+            <option value="$PROJECT_DIR$/app" />
+          </set>
+        </option>
+        <option name="resolveModulePerSourceSet" value="false" />
+      </GradleProjectSettings>
+    </option>
+  </component>
+</project>

+ 9 - 0
android/.idea/misc.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/build/classes" />
+  </component>
+  <component name="ProjectType">
+    <option name="id" value="Android" />
+  </component>
+</project>

+ 6 - 0
android/.idea/render.experimental.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RenderSettings">
+    <option name="showDecorations" value="true" />
+  </component>
+</project>

+ 12 - 0
android/.idea/runConfigurations.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RunConfigurationProducerService">
+    <option name="ignoredProducers">
+      <set>
+        <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
+        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
+        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
+      </set>
+    </option>
+  </component>
+</project>

+ 6 - 0
android/.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>

+ 34 - 0
android/Fonctionnalités.md

@@ -0,0 +1,34 @@
+Gestion des utilisateurs: 
+
+	- Création de compte utilisateur
+	- Connexion sécurisée à l'application
+	- Gestion de profil
+	- Ajout et gestion d'amis
+	- Gestion des listes
+	- Choix des personnes avec qui  partager une liste ou plusieurs
+	- Consulter les listes partager avec lui
+	- Réserver un jeux
+
+	
+Gestion Des Cadeaux :
+
+	- Enregistrement des cadeaux
+	- Collecte des meta informations sur des sites de vente ou ajouter une adresse de magasin physique
+	- Ajout de meta informations  sur le cadeau
+	- Ajout d'un champ de commentaire sur chaque cadeau
+	- Evaluation (interet) sur le cadeau 
+	
+Gestion de la liste: 
+
+	
+	- Création
+	- modifications
+	- consultation 
+	- Suppression
+	
+
+Notification 
+
+	- Notifications quand des cadeaux sont ajoutés 
+	
+	

+ 111 - 0
android/README.md

@@ -0,0 +1,111 @@
+# Wishurgift Android
+
+L'application Android Wishurgift, dans le cadre du projet du second semestre de l'année 2019-2020 du M2 ILI à l'université d'Artois.
+
+Les membres du groupe sont :
+- Arthur Brandao
+- Maxence Bacquet
+- Ouahab Fenniche
+- Aymeric Vandewoorde
+ 
+## Le serveur
+
+Pour fonctionner l'application à besoins d'une API mise à disposition par un serveur. [Le serveur de l'application est disponoble ici](https://gitlab.univ-artois.fr/arthur_brandao/wishurgift-server).
+L'API est décrite dans le documentation du serveur. Il existe aussi un faux serveur ([disponible ici](https://gitlab.univ-artois.fr/arthur_brandao/wishurgift-mock-server)) dans le but de ne pas bloquer le développement de l'application. 
+Il implemente la même API mais retourne des données factices.
+
+## L'application
+
+Wishurgift est une application de liste de souhait communautaire. Elle permet de créer des listes de souhaits et de les partager à ces contacts et de réserver des cadeaux dans les listes des autres.
+Elle dispose de fonction communautaire comme un système de commentaire et permet la création de liste privée (partageable à ces certains contacts) ou plublique (visible par tous le monde).
+
+Pour faciliter le développement le serveur a été mis en ligne à l'adresse http://wishurgift.loquico.me, cependant pour éviter de payer le serveur, il a été coupé le 29 avril. 
+
+## Fonctionnalité
+
+Description de chaque fonctionnalité majeure de l'application.
+
+### Gestion des listes
+
+- [x] Écran affichant toutes les listes de l'utilisateurs
+- [x] Ajouter une nouvelle liste
+- [x] Modifier une liste existante
+- [x] Supprimer une liste existante
+- [x] Partager une liste existante via l'application aux différents contacts de l'utilisateur
+- [x] Gérer les droits d'une liste (qui peut voir ma liste) pour pouvoir supprimer ou ajouter des utilisateurs
+
+### Création / Modification d'une liste
+
+- [x] Nommer / Renommer la liste
+- [x] Ajouter des éléments
+- [x] Retirer des éléments
+- [x] Modifier des éléments
+- [x] Possibilité de choisir état par défaut de la liste (publique: tous mes contacts peuvent la voir, privé : uniquement les contacts choisit peuvent la voir)
+
+### Édition d'un élément
+
+- [x] Nom de l'élément
+- [x] Possibilité d'ajouter un lien
+- [x] Possibilité d'ajouter des coordonnées GPS (via une adresse) pour indiquer ou trouver le produit
+- [x] Prix
+- [x] État de l'élément (idea, crush, reserved, purchased)
+- [x] Description / Notes
+
+### Connexion à un compte 
+
+- [x] Création compte
+- [x] Connexion à un compte existant 
+- [x] Déconnexion si connecté
+
+### Profil
+
+- [x] Nom de l'utilisateur
+- [x] Consultation de l'email
+- [x] modification de l'email
+- [x] modification du mot de passe
+- [x] modification du nom d'utilisateur 
+- [x] Consultation avatar (Gravatar)
+- [x] Identifiant unique (soit le nom d'utilisateur qui doit être unique, soit un code, soit un tag après le pseudo comme discord ou battle.net)
+- [x] Profil publique ou privée pour savoir si il apparait dans les recherches de contact
+
+### Liste de contact
+
+- [x] Ajouter un contact : via son identifiant unique ou  système de recherche
+- [x] Supprimer un contact
+- [x] Décliner une demande d'un contact
+- [x] Voir les détails d'un contact et ses statistiques
+- [x] Voir les listes d'un contacts
+
+### Liste appartenant a un contact
+
+- [x] Changer d'état un élément (pour indiquer que l'on va ou que l'a acheté)
+- [x] Commenter (un élément ou la liste)
+
+### Paramètre
+
+- [x] Changer la couleur de l'appli
+- [ ] Mode clair / sombre 
+- [ ] Possibilité de verrouiller l'application au demarage
+
+### Zone Notification
+
+- [x] Demande de contact
+
+## Technologie
+
+Voici les principales technologies et framework utilisé dans le projet :
+- Java 8 : Langage de programmation
+- GSON : Parser JSON
+- Volley : Requete  HTTP
+- Glide : Gestion des images
+- Saripaar : Validation données 
+
+## Paramètrage du serveur
+
+L'url du serveur doit être précisé dans la classe [Constants](https://gitlab.univ-artois.fr/arthur_brandao/wishurgift/-/blob/master/app/src/main/java/com/androiddev/project/ili/wishurgift/util/Constants.java), il suffit de modifier la constante API_URL
+
+## Autre projet Wishurgift
+
+Voici la liste des differents projets Wishurgift :
+- [Le serveur](https://gitlab.univ-artois.fr/arthur_brandao/wishurgift-server)
+- [Le mock server](https://gitlab.univ-artois.fr/arthur_brandao/wishurgift-mock-server)

+ 1 - 0
android/app/.gitignore

@@ -0,0 +1 @@
+/build

+ 57 - 0
android/app/build.gradle

@@ -0,0 +1,57 @@
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion 29
+    buildToolsVersion "29.0.2"
+    defaultConfig {
+        applicationId "com.androiddev.project.ili.wishurgift"
+        minSdkVersion 21
+        targetSdkVersion 29
+        versionCode 1
+        versionName "1.0"
+        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+        }
+    }
+    compileOptions {
+        sourceCompatibility = 1.8
+        targetCompatibility = 1.8
+    }
+}
+
+dependencies {
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    implementation 'androidx.appcompat:appcompat:1.0.2'
+    implementation 'androidx.recyclerview:recyclerview:1.0.0'
+    implementation 'androidx.cardview:cardview:1.0.0'
+    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
+    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
+    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
+    implementation 'com.google.android.material:material:1.1.0'
+    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
+    testImplementation 'junit:junit:4.12'
+    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
+    implementation 'com.android.volley:volley:1.1.0'
+    implementation 'com.google.code.gson:gson:2.8.0'
+    implementation 'com.koushikdutta.ion:ion:2.1.7'
+    implementation 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
+    implementation 'com.android.support:design:29.0.2'
+    //animated button for login
+    implementation 'br.com.simplepass:loading-button-android:1.14.0'
+    androidTestImplementation 'com.android.support.test:runner:1.0.2'
+    implementation 'com.android.support.test.espresso:espresso-contrib:3.0.2'
+
+    implementation 'de.hdodenhof:circleimageview:3.1.0'
+    implementation 'com.github.bumptech.glide:glide:4.10.0'
+    //Add Google Play services
+    implementation 'com.google.android.gms:play-services-auth:17.0.0'
+
+    // Validator
+    implementation 'com.mobsandgeeks:android-saripaar:2.0.3'
+
+
+}

+ 21 - 0
android/app/proguard-rules.pro

@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 27 - 0
android/app/src/androidTest/java/com/androiddev/project/ili/wishurgift/ExampleInstrumentedTest.java

@@ -0,0 +1,27 @@
+package com.androiddev.project.ili.wishurgift;
+
+import android.content.Context;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.platform.app.InstrumentationRegistry;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+    @Test
+    public void useAppContext() {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
+
+        assertEquals("com.androiddev.project.ili.wishurgift", appContext.getPackageName());
+    }
+}

+ 41 - 0
android/app/src/main/AndroidManifest.xml

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.androiddev.project.ili.wishurgift">
+
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.USE_FINGERPRINT" />
+    <uses-permission android:name="android.permission.CAMERA" />
+
+    <application
+
+        android:name=".application.Wishurgift"
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name"
+        android:roundIcon="@mipmap/ic_launcher_round"
+        android:supportsRtl="true"
+        android:theme="@style/AppTheme"
+        android:usesCleartextTraffic="true"
+        android:noHistory="true">
+        <activity android:name=".activities.ForgotPasswordActivity" />
+        <activity android:name=".activities.MainActivity"
+            android:windowSoftInputMode="stateHidden">
+
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name=".activities.RegisterActivity" />
+        <activity android:name=".activities.AppMainActivity" android:launchMode="singleTask"/>
+        <activity android:name=".activities.LoginActivity" />
+
+
+        <meta-data
+            android:name="preloaded_fonts"
+            android:resource="@array/preloaded_fonts" />
+    </application>
+
+</manifest>

BIN
android/app/src/main/ic_launcher-playstore.png


BIN
android/app/src/main/ic_launcher-web.png


+ 116 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/.idea/codeStyles/Project.xml

@@ -0,0 +1,116 @@
+<component name="ProjectCodeStyleConfiguration">
+  <code_scheme name="Project" version="173">
+    <codeStyleSettings language="XML">
+      <indentOptions>
+        <option name="CONTINUATION_INDENT_SIZE" value="4" />
+      </indentOptions>
+      <arrangement>
+        <rules>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>xmlns:android</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>xmlns:.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>BY_NAME</order>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*:id</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*:name</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>name</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>style</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>BY_NAME</order>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>ANDROID_ATTRIBUTE_ORDER</order>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>.*</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>BY_NAME</order>
+            </rule>
+          </section>
+        </rules>
+      </arrangement>
+    </codeStyleSettings>
+  </code_scheme>
+</component>

+ 8 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/wishurgift.iml" filepath="$PROJECT_DIR$/.idea/wishurgift.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$/../../../../../../../../.." vcs="Git" />
+  </component>
+</project>

+ 93 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/.idea/workspace.xml

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ChangeListManager">
+    <list default="true" id="06ec854e-ad51-40d9-8fed-420bd2f53004" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/../../../../../../res/drawable/profile_item_top_border.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../../../../../res/layout/tool_bar.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../../../../../res/values/color.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../../../../../../../.idea/gradle.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../../../../../../../../.idea/gradle.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../../../../../../build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/../../../../../../../../build.gradle" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../../../../AndroidManifest.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../../../../../AndroidManifest.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/activities/LoginActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/activities/LoginActivity.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../../../../res/layout/activity_login.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../../../../../res/layout/activity_login.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../../../../res/layout/activity_register.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../../../../../res/layout/activity_register.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../../../../res/values/dimens.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../../../../../res/values/dimens.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../../../../../res/values/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../../../../../res/values/strings.xml" afterDir="false" />
+    </list>
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../../../../../../../.." />
+  </component>
+  <component name="ProjectFrameBounds">
+    <option name="x" value="-13" />
+    <option name="y" value="23" />
+    <option name="width" value="1440" />
+    <option name="height" value="808" />
+  </component>
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
+  <component name="ProjectView">
+    <navigator currentView="ProjectPane" proportions="" version="1">
+      <foldersAlwaysOnTop value="true" />
+    </navigator>
+    <panes>
+      <pane id="PackagesPane" />
+      <pane id="ProjectPane" />
+      <pane id="Scope" />
+    </panes>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="android.sdk.path" value="$USER_HOME$/Library/Android/sdk" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+    <property name="settings.editor.selected.configurable" value="AndroidSdkUpdater" />
+  </component>
+  <component name="RunDashboard">
+    <option name="ruleStates">
+      <list>
+        <RuleState>
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
+        </RuleState>
+        <RuleState>
+          <option name="name" value="StatusDashboardGroupingRule" />
+        </RuleState>
+      </list>
+    </option>
+  </component>
+  <component name="SvnConfiguration">
+    <configuration />
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="06ec854e-ad51-40d9-8fed-420bd2f53004" name="Default Changelist" comment="" />
+      <created>1584002704238</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1584002704238</updated>
+    </task>
+    <servers />
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="-13" y="23" width="1440" height="808" extended-state="0" />
+    <layout>
+      <window_info active="true" content_ui="combo" id="Project" visible="true" weight="0.32956952" />
+      <window_info id="Structure" side_tool="true" />
+      <window_info id="Image Layers" />
+      <window_info id="Designer" />
+      <window_info id="Resources Explorer" />
+      <window_info id="Capture Tool" />
+      <window_info id="Favorites" side_tool="true" />
+      <window_info id="Captures" order="0" weight="0.25" />
+      <window_info anchor="bottom" id="Version Control" />
+      <window_info anchor="bottom" id="TODO" />
+      <window_info anchor="bottom" id="Terminal" />
+      <window_info anchor="bottom" id="Event Log" side_tool="true" />
+      <window_info anchor="right" id="Capture Analysis" />
+      <window_info anchor="right" id="Theme Preview" />
+      <window_info anchor="right" id="Palette&#9;" />
+    </layout>
+  </component>
+</project>

+ 210 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/FingerAuthentification/FingerprintDialog.java

@@ -0,0 +1,210 @@
+package com.androiddev.project.ili.wishurgift.FingerAuthentification;
+
+import android.app.KeyguardManager;
+import android.content.Context;
+import android.hardware.fingerprint.FingerprintManager;
+import android.os.Build;
+import android.os.Bundle;
+import android.security.keystore.KeyGenParameterSpec;
+import android.security.keystore.KeyPermanentlyInvalidatedException;
+import android.security.keystore.KeyProperties;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.Toast;
+
+import androidx.annotation.RequiresApi;
+import androidx.fragment.app.DialogFragment;
+
+import com.androiddev.project.ili.wishurgift.R;
+
+import java.io.IOException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.UnrecoverableKeyException;
+import java.security.cert.CertificateException;
+
+import javax.crypto.Cipher;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+
+public class FingerprintDialog extends DialogFragment
+        implements FingerprintHelper.Callback {
+
+    Button mCancelButton;
+    public static final String DEFAULT_KEY_NAME = "default_key";
+    FingerprintManager mFingerprintManager;
+
+    private FingerprintManager.CryptoObject mCryptoObject;
+    private FingerprintHelper mFingerprintHelper;
+
+    KeyStore mKeyStore = null;
+    KeyGenerator mKeyGenerator = null;
+    KeyguardManager mKeyguardManager;
+
+    private Context mContext;
+
+    @RequiresApi(api = Build.VERSION_CODES.M)
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setRetainInstance(true);
+        setStyle(DialogFragment.STYLE_NORMAL, android.R.style.Theme_Material_Light_Dialog);
+
+        try {
+            mKeyStore = KeyStore.getInstance("AndroidKeyStore");
+
+        } catch (KeyStoreException e) {
+            e.printStackTrace();
+        }
+
+        try {
+            mKeyGenerator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES, "AndroidKeyStore");
+        } catch (NoSuchAlgorithmException e) {
+            e.printStackTrace();
+        } catch (NoSuchProviderException e) {
+            e.printStackTrace();
+        }
+
+        Cipher defaultCipher;
+        try {
+            defaultCipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/"
+                    + KeyProperties.BLOCK_MODE_CBC + "/"
+                    + KeyProperties.ENCRYPTION_PADDING_PKCS7);
+        } catch (NoSuchAlgorithmException | NoSuchPaddingException e) {
+            throw new RuntimeException("Failed to get an instance of Cipher", e);
+        }
+
+        mKeyguardManager = getContext().getSystemService(KeyguardManager.class);
+        mFingerprintManager = getContext().getSystemService(FingerprintManager.class);
+
+        mFingerprintHelper = new FingerprintHelper(mFingerprintManager, getContext(), this);
+
+        if (!mKeyguardManager.isKeyguardSecure()) {
+            Toast.makeText(getContext(),
+                    "Lock screen not set up.\n"
+                            + "Go to 'Settings -> Security -> Fingerprint' to set up a fingerprint",
+                    Toast.LENGTH_LONG).show();
+            return;
+        }
+
+        createKey(DEFAULT_KEY_NAME);
+
+        if (initCipher(defaultCipher, DEFAULT_KEY_NAME)) {
+            mCryptoObject = new FingerprintManager.CryptoObject(defaultCipher);
+        }
+    }
+
+    @RequiresApi(api = Build.VERSION_CODES.M)
+    private boolean initCipher(Cipher cipher, String keyName) {
+        try {
+            mKeyStore.load(null);
+            SecretKey key = (SecretKey) mKeyStore.getKey(keyName, null);
+            cipher.init(Cipher.ENCRYPT_MODE, key);
+
+
+            return true;
+        } catch (KeyPermanentlyInvalidatedException e) {
+            Toast.makeText(mContext, "Keys are invalidated after created. Retry the purchase\n"
+                            + e.getMessage(),
+                    Toast.LENGTH_LONG).show();
+
+            return false;
+        } catch (KeyStoreException | CertificateException | UnrecoverableKeyException | IOException
+                | NoSuchAlgorithmException | InvalidKeyException e) {
+            Toast.makeText(mContext, "Failed to init cipher", Toast.LENGTH_LONG).show();
+            return false;
+        }
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        View v = inflater.inflate(R.layout.dialog_fingerprint, container, false);
+        mCancelButton = v.findViewById(R.id.btnCancel);
+        mCancelButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                dismiss();
+            }
+        });
+
+        return v;
+    }
+
+    @RequiresApi(api = Build.VERSION_CODES.M)
+    @Override
+    public void onResume() {
+        super.onResume();
+
+        if (mCryptoObject != null) {
+            mFingerprintHelper.startAuthentication(mFingerprintManager, mCryptoObject);
+        }
+    }
+
+    @RequiresApi(api = Build.VERSION_CODES.M)
+    @Override
+    public void onPause() {
+        super.onPause();
+        mFingerprintHelper.stopListening();
+    }
+
+    public void setContext(Context context) {
+        mContext = context;
+    }
+
+
+    @RequiresApi(api = Build.VERSION_CODES.M)
+    public void createKey(String keyName) {
+        // The enrolling flow for fingerprint. This is where you ask the user to set up fingerprint
+        // for your flow. Use of keys is necessary if you need to know if the set of
+        // enrolled fingerprints has changed.
+        try {
+            mKeyStore.load(null);
+            // Set the alias of the entry in Android KeyStore where the key will appear
+            // and the constrains (purposes) in the constructor of the Builder
+
+            KeyGenParameterSpec.Builder builder = new KeyGenParameterSpec.Builder(keyName,
+                    KeyProperties.PURPOSE_ENCRYPT |
+                            KeyProperties.PURPOSE_DECRYPT)
+                    .setBlockModes(KeyProperties.BLOCK_MODE_CBC)
+                    // Require the user to authenticate with a fingerprint to authorize every use
+                    // of the key
+                    .setUserAuthenticationRequired(true)
+                    .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_PKCS7);
+
+            mKeyGenerator.init(builder.build());
+            mKeyGenerator.generateKey();
+        } catch (NoSuchAlgorithmException | InvalidAlgorithmParameterException
+                | CertificateException | IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
+    public void onAuthenticated(boolean b) {
+        if (b) {
+            Toast.makeText(mContext.getApplicationContext(), "Auth success", Toast.LENGTH_LONG).show();
+            dismiss();
+        } else
+            Toast.makeText(mContext.getApplicationContext(), "Auth failed", Toast.LENGTH_LONG).show();
+    }
+
+    @Override
+    public void onError(String s) {
+        Toast.makeText(mContext.getApplicationContext(), s, Toast.LENGTH_LONG).show();
+    }
+
+    @Override
+    public void onHelp(String s) {
+        Toast.makeText(mContext.getApplicationContext(), "Auth help message:" + s, Toast.LENGTH_LONG).show();
+    }
+}
+

+ 91 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/FingerAuthentification/FingerprintHelper.java

@@ -0,0 +1,91 @@
+package com.androiddev.project.ili.wishurgift.FingerAuthentification;
+
+import android.Manifest;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.hardware.fingerprint.FingerprintManager;
+import android.os.Build;
+import android.os.CancellationSignal;
+
+import androidx.annotation.RequiresApi;
+import androidx.core.app.ActivityCompat;
+
+@RequiresApi(api = Build.VERSION_CODES.M)
+public class FingerprintHelper extends  FingerprintManager.AuthenticationCallback  {
+
+
+    private Context mContext;
+    private FingerprintManager mFingerprintManager;
+    private CancellationSignal mCancellationSignal;
+    private Callback mCallback;
+
+
+    public FingerprintHelper(FingerprintManager fingerprintManager, Context context, Callback callback) {
+        mContext = context;
+        mFingerprintManager = fingerprintManager;
+        mCallback = callback;
+
+    }
+
+
+    public boolean isFingerprintAuthAvailable() {
+
+        return mFingerprintManager.isHardwareDetected()
+                && mFingerprintManager.hasEnrolledFingerprints();
+    }
+
+
+    public void startAuthentication(FingerprintManager manager, FingerprintManager.CryptoObject cryptoObject) {
+
+        if (!isFingerprintAuthAvailable())
+            return;
+
+        mCancellationSignal = new CancellationSignal();
+        if (ActivityCompat.checkSelfPermission(mContext, Manifest.permission.USE_FINGERPRINT) != PackageManager.PERMISSION_GRANTED) {
+            return;
+        }
+
+        manager.authenticate(cryptoObject, mCancellationSignal, 0, this, null);
+    }
+
+
+    public void stopListening() {
+        if (mCancellationSignal != null) {
+            mCancellationSignal.cancel();
+            mCancellationSignal = null;
+        }
+    }
+
+    @Override
+    public void onAuthenticationError(int errMsgId, CharSequence errString) {
+        mCallback.onError(errString.toString());
+    }
+
+
+    @Override
+    public void onAuthenticationHelp(int helpMsgId, CharSequence helpString) {
+        mCallback.onHelp(helpString.toString());
+    }
+
+
+    @Override
+    public void onAuthenticationFailed() {
+        mCallback.onAuthenticated(false);
+    }
+
+
+    @Override
+    public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
+        mCallback.onAuthenticated(true);
+    }
+
+
+    public interface Callback {
+
+        void onAuthenticated(boolean b);
+
+        void onError(String s);
+
+        void onHelp(String s);
+    }
+}

+ 252 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/activities/AppMainActivity.java

@@ -0,0 +1,252 @@
+package com.androiddev.project.ili.wishurgift.activities;
+
+import android.app.ProgressDialog;
+import android.os.Bundle;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.fragments.AddContactsFragment;
+import com.androiddev.project.ili.wishurgift.fragments.AddElementFragment;
+import com.androiddev.project.ili.wishurgift.fragments.AddWishListFragment;
+import com.androiddev.project.ili.wishurgift.fragments.EditElementFragment;
+import com.androiddev.project.ili.wishurgift.fragments.EditProfilFragment;
+import com.androiddev.project.ili.wishurgift.fragments.ElementFragment;
+import com.androiddev.project.ili.wishurgift.fragments.ListeContactsFragment;
+import com.androiddev.project.ili.wishurgift.fragments.MyListFragment;
+import com.androiddev.project.ili.wishurgift.fragments.ProfilFragment;
+import com.androiddev.project.ili.wishurgift.fragments.SettingsFragment;
+import com.androiddev.project.ili.wishurgift.fragments.ShareListFragment;
+import com.androiddev.project.ili.wishurgift.fragments.ShowContactDetails;
+import com.androiddev.project.ili.wishurgift.fragments.WishListContentFragment;
+import com.google.android.material.bottomnavigation.BottomNavigationView;
+
+/**
+ * Activité regroupant l'affichage de toutes les actions utilisateur possibles une fois connecté
+ */
+public class AppMainActivity extends AppCompatActivity {
+
+    BottomNavigationView bottomNavigationView;
+    private ProgressDialog pg;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_fragment_list_test);
+        Fragment fragment = MyListFragment.newInstance();
+        bottomNavigationView = findViewById(R.id.bottom_navigation);
+
+        if (savedInstanceState == null) {
+            getSupportFragmentManager().beginTransaction().add(R.id.fragmentContainerList, fragment).commit();
+        }
+        bottomNavigationView.setOnNavigationItemSelectedListener(menuItem -> {
+            Fragment fragment1 = null;
+
+            switch (menuItem.getItemId()) {
+                case R.id.dashboardfragment:
+                    fragment1 = MyListFragment.newInstance();
+                    break;
+
+                case R.id.profilesfragment:
+                    fragment1 = ProfilFragment.newInstance(Wishurgift.getSessionVariables().getUserConnected().getId());
+                    break;
+                case R.id.contactsfragment:
+                    fragment1 = ListeContactsFragment.newInstance();
+                    break;
+
+
+                case R.id.settingsfragment:
+                    fragment1 = SettingsFragment.newInstance();
+                    break;
+
+            }
+            getSupportFragmentManager().beginTransaction().replace(R.id.fragmentContainerList, fragment1).commit();
+            return true;
+        });
+    }
+
+    /**
+     * Permet d'afficher le fragment correspondant à la liste de contact de l'utilisateur connecté
+     */
+    public void afficherListesContacts(){
+        Fragment fragment=null;
+        try {
+            fragment= ListeContactsFragment.newInstance();
+        } catch (Exception e){
+            e.printStackTrace();
+        }
+        FragmentManager frM= getSupportFragmentManager();
+        frM.beginTransaction().replace(R.id.fragmentContainerList,fragment).commit();
+    }
+
+    /**
+     * Affiche le fragment correspondant au contenu d'une wishlist
+     * @param idWishlist l'identifiant de la wishlist à afficher
+     * @param appartient indique si la wishlist appartient à l'utilisateur connecté
+     */
+    public void afficherContenuWishList(int idWishlist, boolean appartient) {
+        Fragment fragment = null;
+        try {
+            fragment = WishListContentFragment.newInstance(idWishlist, appartient);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        FragmentManager fragmentManager = getSupportFragmentManager();
+        fragmentManager.beginTransaction().replace(R.id.fragmentContainerList, fragment).commit();
+    }
+
+    /**
+     * Affiche le fragment correspondant au panneau d'affichage des wishlists
+     */
+    public void afficherWishListList() {
+        Fragment fragment = null;
+        try {
+            fragment = MyListFragment.newInstance();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        FragmentManager fragmentManager = getSupportFragmentManager();
+        fragmentManager.beginTransaction().replace(R.id.fragmentContainerList, fragment).commit();
+    }
+
+    /**
+     * Affiche le fragment permettant de créer une wishlist
+     */
+    public void afficherAjouterWishList() {
+        Fragment fragment = null;
+        try {
+            fragment = AddWishListFragment.newInstance();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        FragmentManager fragmentManager = getSupportFragmentManager();
+        fragmentManager.beginTransaction().replace(R.id.fragmentContainerList, fragment).commit();
+    }
+
+    /**
+     * Affiche le fragment permettant l'ajout d'un élément dans une wishlist
+     * @param idWishlist la wishlist à laquelle on ajoute un élément
+     */
+    public void afficherAjouterElement(int idWishlist) {
+        Fragment fragment = null;
+        try {
+            fragment = AddElementFragment.newInstance(idWishlist);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        FragmentManager fragmentManager = getSupportFragmentManager();
+        fragmentManager.beginTransaction().replace(R.id.fragmentContainerList, fragment).commit();
+    }
+
+    /**
+     * Affiche le fragment correspondant au détail d'un élément
+     * @param wishlistId La wishlist auquel l'élément est rattaché
+     * @param elementId L'élément à afficher
+     * @param appartient Indique si la wishlist appartient à l'utilisateur connecté
+     */
+    public void afficherElement(int wishlistId, int elementId, boolean appartient) {
+        Fragment fragment = null;
+        try {
+            fragment = ElementFragment.newInstance(wishlistId, elementId, appartient);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        FragmentManager fragmentManager = getSupportFragmentManager();
+        fragmentManager.beginTransaction().replace(R.id.fragmentContainerList, fragment).commit();
+    }
+
+
+    /**
+     * Affiche le fragment correspondant à l'ajout d'un contact
+     */
+    public void afficherAjoutContact() {
+        Fragment fragment = null;
+        try {
+            fragment = AddContactsFragment.newInstance();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        FragmentManager fr = getSupportFragmentManager();
+        fr.beginTransaction().replace(R.id.fragmentContainerList, fragment).commit();
+    }
+
+    /**
+     * Affiche le fragment correspondant au profil de l'utilisateur
+     * @param idUtilisateur L'utilisateur à afficher
+     */
+    public void afficherProfil(int idUtilisateur) {
+        Fragment fragment = null;
+        try {
+            fragment = ProfilFragment.newInstance(idUtilisateur);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        FragmentManager fr = getSupportFragmentManager();
+        fr.beginTransaction().replace(R.id.fragmentContainerList, fragment).commit();
+    }
+
+    /**
+     * Affiche le fragment correspondant à la mise a jour du profil
+     * @param idUtilisateur L'id de l'utilisateur à mettre à jour
+     */
+    public void updateProfil(int idUtilisateur) {
+        Fragment fragment = null;
+        try {
+            fragment = EditProfilFragment.newInstance(idUtilisateur);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        FragmentManager fr = getSupportFragmentManager();
+        fr.beginTransaction().replace(R.id.fragmentContainerList, fragment).commit();
+    }
+
+    /**
+     * Affiche le fragment permettant le partage d'une liste à un utilisateur
+     * @param idWishlist l'id de la wishlist à partager
+     */
+    public void afficherShareList(int idWishlist) {
+        Fragment fragment = null;
+        try {
+            fragment = ShareListFragment.newInstance(idWishlist);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        FragmentManager fr = getSupportFragmentManager();
+        fr.beginTransaction().replace(R.id.fragmentContainerList, fragment).commit();
+    }
+
+    /**
+     * Affiche le fragment permettant la mise à jour d'un élément
+     * @param wishlistParentId l'id de la wishlist rattachée à l'élément
+     * @param idElement l'id de l'élément à mettre à jour
+     */
+    public void updateElement(int wishlistParentId, int idElement) {
+
+        Fragment fragment = null;
+        try {
+            fragment = EditElementFragment.newInstance(wishlistParentId, idElement);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        FragmentManager fr = getSupportFragmentManager();
+        fr.beginTransaction().replace(R.id.fragmentContainerList, fragment).commit();
+    }
+
+    /**
+     * Affiche le fragment correspondant au profil d'un contact
+     * @param idContact L'identifiant du contact à afficher
+     */
+    public void afficherDétailsContact(int idContact) {
+        Fragment fragment = null;
+        try {
+            fragment = ShowContactDetails.newInstance(idContact);
+        } catch (Exception e){
+            e.printStackTrace();
+        }
+        FragmentManager fr = getSupportFragmentManager();
+        fr.beginTransaction().replace(R.id.fragmentContainerList, fragment).commit();
+    }
+}

+ 35 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/activities/ForgotPasswordActivity.java

@@ -0,0 +1,35 @@
+package com.androiddev.project.ili.wishurgift.activities;
+
+import android.os.Bundle;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ProgressBar;
+import android.widget.Toast;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+
+import com.androiddev.project.ili.wishurgift.R;
+
+public class ForgotPasswordActivity extends AppCompatActivity {
+
+    Toolbar toolbar;
+    ProgressBar progressBar;
+    EditText userEmail;
+    Button userPass;
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_forgot_password);
+
+        toolbar = findViewById(R.id.toolbar);
+        progressBar = findViewById(R.id.progressBar);
+        userEmail = findViewById(R.id.userEmail);
+        userPass = findViewById(R.id.btnForgotPass);
+
+        toolbar.setTitle("Mot de passe oublié");
+        userPass.setOnClickListener(v -> Toast.makeText(ForgotPasswordActivity.this, "Pas encore implémenté coté back ...", Toast.LENGTH_SHORT).show());
+    }
+}

+ 200 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/activities/LoginActivity.java

@@ -0,0 +1,200 @@
+package com.androiddev.project.ili.wishurgift.activities;
+
+import android.annotation.SuppressLint;
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.view.inputmethod.EditorInfo;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.core.hardware.fingerprint.FingerprintManagerCompat;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.FingerAuthentification.FingerprintDialog;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.api.UserApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.User;
+import com.google.android.material.snackbar.Snackbar;
+import com.google.gson.Gson;
+import com.mobsandgeeks.saripaar.ValidationError;
+import com.mobsandgeeks.saripaar.Validator;
+import com.mobsandgeeks.saripaar.annotation.Email;
+import com.mobsandgeeks.saripaar.annotation.NotEmpty;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.List;
+
+public class LoginActivity extends AppCompatActivity implements View.OnClickListener, Validator.ValidationListener {
+
+    @NotEmpty
+    @Email
+    private EditText mEmailView;
+
+    @NotEmpty
+    private EditText mPasswordView;
+
+    private ProgressDialog pg;
+
+    private View mLoginFormView;
+    private Button mEmailSignInButton;
+    private Gson gson = new Gson();
+    Button login;
+    FingerprintManagerCompat managerCompat;
+
+    private Validator validator;
+
+    @SuppressLint("WrongViewCast")
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_login);
+        validator = new Validator(this);
+        validator.setValidationListener(this);
+
+        mEmailView = findViewById(R.id.email_signin);
+
+        mPasswordView = findViewById(R.id.password_signin);
+        mPasswordView.setOnEditorActionListener(
+                (textView, id, keyEvent) -> {
+                    if (id == R.id.login_signin || id == EditorInfo.IME_NULL) {
+                        attemptLogin();
+                        return true;
+                    }
+                    return false;
+                });
+
+
+        mEmailSignInButton= findViewById(R.id.login_signin);
+
+        mEmailSignInButton.setOnClickListener(v -> {
+            validator.validate(true);
+        });
+    }
+
+    /**
+     * Envoie les informations de connexion à l'utilisateur, connecte l'utilisateur ou affiche un message en cas d'erreur
+     */
+    private void attemptLogin() {
+        onPreExecute();
+        UserApi.login(mEmailView.getText().toString(), mPasswordView.getText().toString(), (Response.Listener<JSONObject>) response -> {
+            Log.d("response", response.toString());
+            try {
+                Wishurgift.getSessionVariables().setToken(response.getJSONObject("data").getString("token"));
+                Log.d("token", Wishurgift.getSessionVariables().getToken());
+                Wishurgift.getSessionVariables().setUserConnected(gson.fromJson(response.getJSONObject("data").getJSONObject("user").toString(), User.class));
+                onLoginOk();
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            Log.d("error","login issue " + (pg==null));
+            if(pg!=null){
+                pg.hide();
+            }
+            AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(this);
+            alertDialogBuilder.setTitle("Authentification failed");
+            alertDialogBuilder.setMessage("Check your login/password or if you are connected to internet. If the error persist contact the administrator").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+                @Override
+                public void onClick(DialogInterface dialog, int which) {
+                    dialog.cancel();
+                }
+            });
+            AlertDialog alertDialog =alertDialogBuilder.create();
+            alertDialog.show();
+        });
+    }
+
+
+    /**
+     * Indique à l'utilisateur que l'authentification est en cours
+     */
+    private void onPreExecute() {
+        if(pg==null) {
+            pg = new ProgressDialog(this, R.style.AppTheme_Dark_Dialog);
+        }
+        pg.setTitle("authentication in progress...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+
+    }
+
+    /**
+     * Affiche le formulaire d'inscription
+     * @param View la vue courante
+     */
+    public void onLoginClick(View View) {
+        startActivity(new Intent(this, RegisterActivity.class));
+        overridePendingTransition(R.anim.slide_in_right, R.anim.stay);
+
+    }
+
+    /**
+     * Affiche l'activité principale à l'utilisateur une fois connecté
+     */
+    public void onLoginOk() {
+        if(pg!=null)
+            pg.dismiss();
+        finish();
+        startActivity(new Intent(this, AppMainActivity.class));
+    }
+
+    private void showFingerPrintDialog() {
+
+        FingerprintDialog fragment = new FingerprintDialog();
+        fragment.setContext(this);
+        fragment.show(getSupportFragmentManager(), "");
+
+
+    }
+
+    @Override
+    public void onClick(View v) {
+        switch (v.getId()) {
+            case R.id.login_signin:
+                managerCompat = FingerprintManagerCompat.from(LoginActivity.this);
+
+                if (managerCompat.isHardwareDetected() && managerCompat.hasEnrolledFingerprints()) {
+                    showFingerPrintDialog();
+                } else {
+                    Toast.makeText(getApplicationContext(), "Fingerprint not supported", Toast.LENGTH_SHORT).show();
+                }
+                break;
+        }
+    }
+
+    public void forgotPasseword(View view) {
+        startActivity(new Intent(this, ForgotPasswordActivity.class));
+        overridePendingTransition(R.anim.slide_in_right, android.R.anim.slide_in_left);
+    }
+
+    @Override
+    public void onValidationSucceeded() {
+        attemptLogin();
+    }
+
+    @Override
+    public void onValidationFailed(List<ValidationError> errors) {
+        for (ValidationError error : errors) {
+            View view = error.getView();
+            String message = error.getCollatedErrorMessage(this);
+
+            if (view instanceof EditText) {
+                ((EditText) view).setError(message);
+            } else {
+                Snackbar.make(view, message, Snackbar.LENGTH_LONG).setAction(message, null).show();
+            }
+        }
+    }
+}

+ 101 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/activities/MainActivity.java

@@ -0,0 +1,101 @@
+package com.androiddev.project.ili.wishurgift.activities;
+
+import android.app.ProgressDialog;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Handler;
+import android.view.View;
+import android.view.WindowManager;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.widget.TextView;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import com.androiddev.project.ili.wishurgift.R;
+
+public class MainActivity extends AppCompatActivity {
+
+
+    private static int SPLASH_TIME_OUT = 5000;
+    // Hooks
+    View first, second, third, fourth, fifth, sixth, first_bottom, second_bottom, third_bottom, fourth_bottom, fifth_bottom, sixth_bottom;
+    TextView w, slogan, bienvenue;
+
+    // Animations
+    Animation topAnimantion, middleAnimantion, bottomAnimantion;
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
+        setContentView(R.layout.activity_splash);
+
+
+        topAnimantion = AnimationUtils.loadAnimation(this, R.anim.top_animantion);
+        middleAnimantion = AnimationUtils.loadAnimation(this, R.anim.middle_animantion);
+        bottomAnimantion = AnimationUtils.loadAnimation(this, R.anim.bottom_animantion);
+
+        //Hooks
+        first = findViewById(R.id.first_line);
+        second = findViewById(R.id.second_line);
+        third = findViewById(R.id.third_line);
+        fourth = findViewById(R.id.fourth_line);
+        fifth = findViewById(R.id.fifth_line);
+        sixth = findViewById(R.id.sixth_line);
+
+        //Hooks
+        first_bottom = findViewById(R.id.first_line_bottom);
+        second_bottom = findViewById(R.id.second_line_bottom);
+        third_bottom = findViewById(R.id.third_line_bottom);
+        fourth_bottom = findViewById(R.id.fourth_line_bottom);
+        fifth_bottom = findViewById(R.id.fifth_line_bottom);
+        sixth_bottom = findViewById(R.id.sixth_line_bottom);
+
+        w = findViewById(R.id.w);
+        slogan = findViewById(R.id.tagLine);
+        bienvenue = findViewById(R.id.bienvenue);
+
+        // Setting Animations
+        first.setAnimation(topAnimantion);
+        second.setAnimation(topAnimantion);
+        third.setAnimation(topAnimantion);
+        fourth.setAnimation(topAnimantion);
+        fifth.setAnimation(topAnimantion);
+        sixth.setAnimation(topAnimantion);
+
+        first_bottom.setAnimation(bottomAnimantion);
+        second_bottom.setAnimation(bottomAnimantion);
+        third_bottom.setAnimation(bottomAnimantion);
+        fourth_bottom.setAnimation(bottomAnimantion);
+        fifth_bottom.setAnimation(bottomAnimantion);
+        sixth_bottom.setAnimation(bottomAnimantion);
+
+        w.setAnimation(middleAnimantion);
+        slogan.setAnimation(topAnimantion);
+        bienvenue.setAnimation(bottomAnimantion);
+
+
+        // Splash Screen
+
+        new Handler().postDelayed(() -> {
+
+            Intent intent = new Intent(MainActivity.this, LoginActivity.class);
+            final ProgressDialog progressDialog = new ProgressDialog(MainActivity.this,
+                    R.style.AppTheme_Dark_Dialog);
+            progressDialog.setIndeterminate(true);
+            progressDialog.setMessage("Loading the application...");
+            progressDialog.show();
+            startActivity(intent);
+            progressDialog.dismiss();
+            finish();
+        }, SPLASH_TIME_OUT);
+
+
+    }
+
+    private void chargementAppliDialog() {
+
+    }
+}

+ 135 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/activities/RegisterActivity.java

@@ -0,0 +1,135 @@
+package com.androiddev.project.ili.wishurgift.activities;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.api.UserApi;
+import com.google.android.material.snackbar.Snackbar;
+import com.mobsandgeeks.saripaar.ValidationError;
+import com.mobsandgeeks.saripaar.Validator;
+import com.mobsandgeeks.saripaar.annotation.Email;
+import com.mobsandgeeks.saripaar.annotation.NotEmpty;
+import com.mobsandgeeks.saripaar.annotation.Password;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.List;
+
+
+public class RegisterActivity extends AppCompatActivity implements Validator.ValidationListener {
+
+    @NotEmpty(trim = true)
+    EditText editTextUsername;
+
+    @NotEmpty(trim = true)
+    @Email
+    EditText  editTextEmail;
+
+    private ProgressDialog pg;
+
+
+
+    @Password(min = 8 , scheme = Password.Scheme.ALPHA_NUMERIC_MIXED_CASE_SYMBOLS, message = "Passwords must be at least 8 characters long, have an upper-case letter, a lower-case letter, a number and a \"special character\". ")
+    EditText editTextPassword;
+
+    private Button mEmailRegisterButton;
+
+    private Validator validator;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_register);
+        mEmailRegisterButton = findViewById(R.id.cirRegisterButton);
+        editTextUsername = findViewById(R.id.editTextName);
+        editTextEmail = findViewById(R.id.email_signin);
+        editTextPassword = findViewById(R.id.password_signup);
+
+        validator = new Validator(this);
+        validator.setValidationListener(this);
+
+        mEmailRegisterButton.setOnClickListener(v -> validator.validate(true));
+
+    }
+
+    public void onLoginClick(View view) {
+        startActivity(new Intent(this, LoginActivity.class));
+        overridePendingTransition(R.anim.slide_in_left, android.R.anim.slide_out_right);
+
+    }
+
+    /**
+     * Inscrit l'utilisateur, en cas d'erreur affiche un message à l'utilisateur
+     */
+    private void attemptRegister() {
+        //showProgress(true);
+        onPreExecute();
+        UserApi.signIn(editTextUsername.getText().toString(), editTextEmail.getText().toString(), editTextPassword.getText().toString(), (Response.Listener<JSONObject>) response -> {
+
+            try {
+                if (response.getBoolean("success")) {
+                    onLoginClick(null);
+                    pg.dismiss();
+                }
+            } catch (JSONException e) {
+                Log.d("error", e.getMessage());
+            }
+        }, error -> {
+            pg.hide();
+            Log.d("error", error.toString());
+            AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(this);
+            alertDialogBuilder.setTitle("Unable to register");
+            alertDialogBuilder.setMessage("You are not connected to the Internet or your email may be already used.\nIf the problem persist, contact the administrator").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+                @Override
+                public void onClick(DialogInterface dialog, int which) {
+                    dialog.cancel();
+                }
+            });
+            AlertDialog alertDialog =alertDialogBuilder.create();
+            alertDialog.show();
+        });
+    }
+
+    @Override
+    public void onValidationSucceeded() {
+        attemptRegister();
+    }
+
+    @Override
+    public void onValidationFailed(List<ValidationError> errors) {
+        for (ValidationError error : errors) {
+            View view = error.getView();
+            String message = error.getCollatedErrorMessage(this);
+
+            if (view instanceof EditText) {
+                ((EditText) view).setError(message);
+            } else {
+                Snackbar.make(view, message, Snackbar.LENGTH_LONG).setAction(message, null).show();
+            }
+        }
+    }
+
+    private void onPreExecute() {
+        if(pg==null){
+            pg = new ProgressDialog(this, R.style.AppTheme_Dark_Dialog);
+        }
+        pg.setTitle("account creation in progress...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+
+    }
+}

+ 157 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/CommentaireAdapter.java

@@ -0,0 +1,157 @@
+package com.androiddev.project.ili.wishurgift.adapter;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.CommentApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.Commentaire;
+
+import java.util.List;
+
+/**
+ * Adapter permettant l'affichage et la gestion de commentaires
+ */
+public class CommentaireAdapter extends ArrayAdapter<Commentaire> {
+    private int idParent;
+    private int idElement;
+    private boolean appartient;
+
+
+    public CommentaireAdapter(Context context, List<Commentaire> listes) {
+        super(context, 0, listes);
+    }
+
+    @NonNull
+    @Override
+    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
+        if (convertView == null) {
+            convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_list_comment, parent, false);
+        }
+        final View listItem = convertView;
+        final Commentaire commentaire = getItem(position);
+        TextView nom = listItem.findViewById(R.id.nomUserComment);
+        TextView date = listItem.findViewById(R.id.dateUserComment);
+        TextView texte = listItem.findViewById(R.id.textUserComment);
+
+        Button update = listItem.findViewById(R.id.updateButtonComment);
+        nom.setText(commentaire.getUser().getUserName());
+        date.setText(commentaire.getDate());
+        texte.setText(commentaire.getText());
+
+        Button updateComment = listItem.findViewById(R.id.saveNewComment);
+        if(commentaire.getUser().getTag().equals(Wishurgift.getSessionVariables().getUserConnected().getTag())) {
+            update.setVisibility(View.VISIBLE);
+            update.setOnClickListener(v -> {
+                update.setVisibility(View.GONE);
+                updateComment.setVisibility(View.VISIBLE);
+                texte.setFocusable(true);
+                texte.setEnabled(true);
+                texte.setClickable(true);
+                texte.setFocusableInTouchMode(true);
+
+                updateComment.setOnClickListener(v1 -> editComment(commentaire.getId(), texte.getText().toString()));
+            });
+        } else {
+            update.setVisibility(View.GONE);
+        }
+        /**
+         * Appel api pour supprimer un commentaire
+         */
+        Log.d("tag",commentaire.getUser().getTag() + " " + Wishurgift.getSessionVariables().getUserConnected().getTag());
+        if(commentaire.getUser().getTag().equals(Wishurgift.getSessionVariables().getUserConnected().getTag())) {
+            listItem.findViewById(R.id.deleteButtonComment).setVisibility(View.VISIBLE);
+            listItem.findViewById(R.id.deleteButtonComment).setOnClickListener(v -> CommentApi.deleteComment(commentaire.getId(), new Response.Listener() {
+                @Override
+                public void onResponse(Object response) {
+                    showElementAfterUpdatingComment(commentaire.getId(), true);
+                }
+            }, error -> onError()));
+
+        } else {
+            listItem.findViewById(R.id.deleteButtonComment).setVisibility(View.GONE);
+        }
+        return convertView;
+    }
+
+    /**
+     * Appel api pour éditer un commentaire
+     * @param id l'id du commentaire à supprimer
+     * @param text le nouveau texte à mettre en place
+     */
+    public void editComment(int id, String text) {
+
+        CommentApi.updateComment(id, text, response -> showElementAfterDeletingComment(id, true), error -> {
+            onError();
+        });
+
+    }
+
+    private void showElementAfterDeletingComment(int id, Boolean appartient) {
+        ((AppMainActivity) getContext()).afficherElement(idParent, idElement, appartient);
+    }
+
+
+
+    private void showElementAfterUpdatingComment(int id, Boolean appartient) {
+        ((AppMainActivity) getContext()).afficherElement(idParent, idElement, appartient);
+    }
+
+    public boolean isAppartient() {
+        return appartient;
+    }
+
+    public void setAppartient(boolean appartient) {
+        this.appartient = appartient;
+    }
+
+    public int getIdParent() {
+        return idParent;
+    }
+
+    public void setIdParent(int idParent) {
+        this.idParent = idParent;
+    }
+
+    public int getIdElement() {
+        return idElement;
+    }
+
+    public void setIdElement(int idElement) {
+        this.idElement = idElement;
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getContext()).finish();
+                getContext().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}

+ 75 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/ContactAdapter.java

@@ -0,0 +1,75 @@
+package com.androiddev.project.ili.wishurgift.adapter;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.ContactsApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.User;
+import com.bumptech.glide.Glide;
+
+import java.util.List;
+
+public class ContactAdapter extends ArrayAdapter<User> {
+
+    public ContactAdapter(Context context, List<User> listes) {
+        super(context, 0, listes);
+    }
+
+    @NonNull
+    @Override
+    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
+        if (convertView == null) {
+            convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_list_contact, parent, false);
+        }
+        final View listItem=convertView;
+        final User contact=getItem(position);
+        TextView nom= listItem.findViewById(R.id.nomContact);
+        TextView tagContact= listItem.findViewById(R.id.contact_tag);
+        ImageView imgContact = listItem.findViewById(R.id.imageContact);
+        Glide.with(getContext()).load(contact.getAvatar()).into(imgContact);
+        nom.setText(contact.getUserName());
+
+        tagContact.setText(contact.getTag());
+        listItem.findViewById(R.id.deleteButtonContact).setOnClickListener(v -> {
+            ContactsApi.deleteContact(contact.getId(), response -> {
+                ((AppMainActivity) getContext()).afficherListesContacts();
+            }, error -> onError());
+        });
+
+        listItem.findViewById(R.id.afficherDetailsContact).setOnClickListener(v -> ((AppMainActivity) getContext()).afficherDétailsContact(contact.getId()));
+        return convertView;
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getContext()).finish();
+                getContext().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}

+ 78 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/ContactPendingAdapter.java

@@ -0,0 +1,78 @@
+package com.androiddev.project.ili.wishurgift.adapter;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.ContactsApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.User;
+import com.bumptech.glide.Glide;
+
+import java.util.List;
+
+public class ContactPendingAdapter extends ArrayAdapter<User> {
+    public ContactPendingAdapter(Context context, List<User> listes) {
+        super(context, 0, listes);
+    }
+
+    @NonNull
+    @Override
+    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
+        if (convertView == null) {
+            convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_list_contact_request, parent, false);
+        }
+        final View listItem = convertView;
+        final User contact = getItem(position);
+        TextView nom = listItem.findViewById(R.id.nomContactRequest);
+        TextView tag = listItem.findViewById(R.id.contactRequest_tag);
+        ImageView img = listItem.findViewById(R.id.imageContactRequest);
+        Glide.with(getContext()).load(contact.getAvatar()).into(img);
+        nom.setText(contact.getUserName());
+        tag.setText(contact.getTag());
+        listItem.findViewById(R.id.addButtonContact).setOnClickListener(v -> {
+            ContactsApi.addContactByTag(contact.getTag(), response -> {
+                ((AppMainActivity) getContext()).afficherListesContacts();
+
+            }, error -> onError());
+        });
+
+        listItem.findViewById(R.id.declineRequest).setOnClickListener(v -> ContactsApi.deleteContact(contact.getId(), response -> {
+            Toast.makeText(getContext(), "friend request rejected", Toast.LENGTH_SHORT).show();
+            ((AppMainActivity) getContext()).afficherListesContacts();
+        }, error -> onError()));
+        return convertView;
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getContext()).finish();
+                getContext().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}

+ 77 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/ContactSearchAdapter.java

@@ -0,0 +1,77 @@
+package com.androiddev.project.ili.wishurgift.adapter;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.ContactsApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.User;
+import com.bumptech.glide.Glide;
+
+import java.util.List;
+
+/**
+ * Created by Ouahab FENNICHE on 26/04/2020
+ */
+public class ContactSearchAdapter extends ArrayAdapter<User> {
+    public ContactSearchAdapter(Context context, List<User> listes) {
+        super(context, 0, listes);
+    }
+
+    @NonNull
+    @Override
+    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
+        if (convertView == null) {
+            convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_list_contact_search, parent, false);
+        }
+        final View listItem = convertView;
+        final User contact = getItem(position);
+        TextView nom = listItem.findViewById(R.id.nomContactFound);
+        TextView email = listItem.findViewById(R.id.contact_emailFound);
+        TextView tag = listItem.findViewById(R.id.contact_tagFound);
+        ImageView image = listItem.findViewById(R.id.imageContactFound);
+        Glide.with(getContext()).load(contact.getAvatar()).into(image);
+        nom.setText(contact.getUserName());
+        email.setText(contact.getEmail());
+        tag.setText(contact.getTag());
+        listItem.findViewById(R.id.addButtonContactFound).setOnClickListener(v -> ContactsApi.addContactByTag(contact.getTag(), response -> {
+            ((AppMainActivity) getContext()).afficherListesContacts();
+
+        }, error -> onError()));
+
+
+        return convertView;
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getContext()).finish();
+                getContext().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}

+ 75 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/ElementAdapter.java

@@ -0,0 +1,75 @@
+package com.androiddev.project.ili.wishurgift.adapter;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.ElementsApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.Element;
+
+import java.util.List;
+
+public class ElementAdapter extends ArrayAdapter<Element> {
+    private boolean appartient;
+    private int idParent;
+
+    public ElementAdapter(Context context, List<Element> listes, boolean appartient, int idParent) {
+        super(context, 0, listes);
+        this.appartient = appartient;
+        this.idParent = idParent;
+    }
+
+    @NonNull
+    @Override
+    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
+        if (convertView == null) {
+            convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_list_content, parent, false);
+        }
+        View listItem = convertView;
+        final Element elt = getItem(position);
+        TextView nom = listItem.findViewById(R.id.nomElement);
+        TextView status = listItem.findViewById(R.id.statusElement);
+        listItem.findViewById(R.id.deleteButtonElement).setOnClickListener(v -> ElementsApi.deleteElement(elt.getId(), response -> showWishlistAfterDeletingElement(elt.getId(), true), error -> onError()));
+        nom.setText(elt.getName());
+        status.setText(elt.getStatus());
+
+
+        return convertView;
+    }
+
+    private void showWishlistAfterDeletingElement(int id, boolean appartient) {
+        ((AppMainActivity) getContext()).afficherContenuWishList(idParent, appartient);
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getContext()).finish();
+                getContext().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+
+}

+ 41 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/ShareUserAdapter.java

@@ -0,0 +1,41 @@
+package com.androiddev.project.ili.wishurgift.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.model.User;
+import com.bumptech.glide.Glide;
+
+import java.util.List;
+
+public class ShareUserAdapter extends ArrayAdapter<User> {
+    public ShareUserAdapter(Context context, List<User> listes) {
+        super(context, 0, listes);
+    }
+
+    @NonNull
+    @Override
+    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
+        if (convertView == null) {
+            convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_list_sharable, parent, false);
+        }
+        final View listItem=convertView;
+        final User contact=getItem(position);
+        TextView nom= listItem.findViewById(R.id.nomContact);
+        TextView tag= listItem.findViewById(R.id.tagContact);
+        ImageView img= listItem.findViewById(R.id.imageContactShare);
+        nom.setText(contact.getUserName());
+        tag.setText(contact.getTag());
+        Glide.with(getContext()).load(contact.getAvatar()).into(img);
+        return convertView;
+    }
+}

+ 121 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/WishListAdapter.java

@@ -0,0 +1,121 @@
+package com.androiddev.project.ili.wishurgift.adapter;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.WishListApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.WishList;
+
+import java.util.List;
+
+public class WishListAdapter extends ArrayAdapter<WishList> {
+    private View popupInputDialogView = null;
+
+    private Button saveNewWishlist, cancelEditWishlist;
+    private TextView newName;
+    private CheckBox newWishlistVisibility;
+
+    public WishListAdapter(Context context, List<WishList> listes) {
+        super(context, 0, listes);
+    }
+
+
+    @NonNull
+    @Override
+    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
+        if (convertView == null) {
+            convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_list_user, parent, false);
+        }
+        final View listItem = convertView;
+        final WishList wishList = getItem(position);
+        TextView nom = listItem.findViewById(R.id.nomListe);
+        TextView stats = listItem.findViewById(R.id.statsWishlist);
+        nom.setText(wishList.getName());
+        stats.setText("Total : " + wishList.getStats().getTotal() + " Non acheté : " + wishList.getStats().getUnbuy());
+        listItem.findViewById(R.id.deleteButtonWishlist).setOnClickListener(v -> {
+            WishListApi.deleteWishList(wishList.getId(), response -> {
+                ((AppMainActivity) getContext()).afficherWishListList();
+            }, error -> onError());
+        });
+
+        listItem.findViewById(R.id.updateButtonWishlist).setOnClickListener(v -> editWishlistPopup(wishList.getId()));
+        return convertView;
+    }
+
+
+    private void editWishlistPopup(int id) {
+
+        AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("Edit Wishlist ");
+        alertDialogBuilder.setIcon(R.drawable.ic_launcher_background);
+        alertDialogBuilder.setCancelable(false);
+        initPopupViewControls();
+        alertDialogBuilder.setView(popupInputDialogView);
+        final AlertDialog alertDialog = alertDialogBuilder.create();
+        alertDialog.show();
+        saveNewWishlist.setOnClickListener(view -> {
+            saveChangeWishlist(id);
+            alertDialog.cancel();
+        });
+
+        cancelEditWishlist.setOnClickListener(view -> alertDialog.cancel());
+
+
+    }
+
+    private void saveChangeWishlist(int id) {
+        WishListApi.updateWishList(id, newName.getText().toString(), newWishlistVisibility.isChecked(), response -> afficherDashboard(id,true), error -> onError());
+    }
+
+    private void afficherDashboard(int id, boolean appartient) {
+        ((AppMainActivity) getContext()).afficherWishListList();
+
+    }
+
+    private void initPopupViewControls() {
+        LayoutInflater layoutInflater = LayoutInflater.from(getContext());
+        popupInputDialogView = layoutInflater.inflate(R.layout.popup_edit_wishlist_dialog, null);
+        newName = popupInputDialogView.findViewById(R.id.newname_popup);
+        newWishlistVisibility = popupInputDialogView.findViewById(R.id.newwishlist_chkpublic);
+        saveNewWishlist = popupInputDialogView.findViewById(R.id.button_save_newWishlist);
+        cancelEditWishlist = popupInputDialogView.findViewById(R.id.button_cancel_editWishlist);
+
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getContext()).finish();
+                getContext().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+
+}

+ 39 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/adapter/WishSharedAdapter.java

@@ -0,0 +1,39 @@
+package com.androiddev.project.ili.wishurgift.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.model.WishList;
+
+import java.util.List;
+
+public class WishSharedAdapter extends ArrayAdapter<WishList> {
+    public WishSharedAdapter(Context context, List<WishList> listes) {
+        super(context, 0, listes);
+    }
+
+    @NonNull
+    @Override
+    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
+        if (convertView == null) {
+            convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_shared_list, parent, false);
+        }
+        final View listItem=convertView;
+        final WishList wishList=getItem(position);
+        TextView nom= listItem.findViewById(R.id.nomListeShared);
+        TextView owner= listItem.findViewById(R.id.nomOwner);
+        TextView stats= listItem.findViewById(R.id.statsWishlistShared);
+        nom.setText(wishList.getName());
+        owner.setText(wishList.getUser().getTag());
+        stats.setText("Total : " + wishList.getStats().getTotal() + " Non acheté : " + wishList.getStats().getUnbuy());
+        return convertView;
+    }
+}

+ 109 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/AppelApi.java

@@ -0,0 +1,109 @@
+package com.androiddev.project.ili.wishurgift.api;
+
+import com.android.volley.AuthFailureError;
+import com.android.volley.DefaultRetryPolicy;
+import com.android.volley.Request;
+import com.android.volley.Response;
+import com.android.volley.toolbox.JsonObjectRequest;
+import com.android.volley.toolbox.StringRequest;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+
+import org.json.JSONObject;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public class AppelApi {
+
+    private static int REQUEST_TIMEOUT_MS = 10000;
+
+    /**
+     * Fait un appel HTTP à l'url indiqué, selon le resultat execute le listener ou l'errorListener associé
+     * @param method Méthode HTTP
+     * @param url URL associé
+     * @param headers Le header rattaché à la requête http
+     * @param listener Le listener associé
+     * @param errorListener Le listener d'erreur
+     * @param putInCache Permet de sauvegarder en cache la réponse de la requète
+     */
+    public static void getString(
+            int method,
+            String url,
+            final Map<String, String> headers,
+            Response.Listener<String> listener,
+            Response.ErrorListener errorListener,
+            boolean putInCache)
+    {
+        StringRequest jsonObjReq = new StringRequest(method, url, listener, errorListener) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                if (headers == null) {
+                    return new LinkedHashMap<>(0);
+                } else {
+                    return headers;
+                }
+            }
+        };
+
+        jsonObjReq.setShouldCache(putInCache);
+        addRequestPolicy(jsonObjReq);
+
+        // Adding request to request queue
+        Wishurgift.get().addToRequestQueue(jsonObjReq, "req_object_" + url.hashCode());
+    }
+
+    public static void addRequestPolicy(Request request)
+    {
+        request.setRetryPolicy(
+                new DefaultRetryPolicy(
+                        REQUEST_TIMEOUT_MS, // 10 000
+                        DefaultRetryPolicy.DEFAULT_MAX_RETRIES,
+                        DefaultRetryPolicy.DEFAULT_BACKOFF_MULT
+                )
+        );
+    }
+
+    /**
+     * @return le token de connexion
+     */
+    public static HashMap<String,String> getHeaderToken(){
+        HashMap<String,String> header = new HashMap<>();
+        header.put("Authorization","Bearer " + Wishurgift.getSessionVariables().getToken());
+        return header;
+    }
+
+    /**
+     * Fait un appel HTTP à l'url indiqué, selon le resultat execute le listener ou l'errorListener associé
+     * @param method Méthode HTTP
+     * @param url URL associé
+     * @param headers Le header rattaché à la requête http
+     * @param params les paramètres associés à l'url
+     * @param listener Le listener associé
+     * @param errorListener Le listener d'erreur
+     * @param putInCache Permet de sauvegarder en cache la réponse de la requète
+     */
+    public static void getJSONObjectWithParams(int method,
+                                               String url,
+                                               final Map<String, String> headers,
+                                               final JSONObject params,
+                                               Response.Listener<JSONObject> listener,
+                                               Response.ErrorListener errorListener,
+                                               boolean putInCache) {
+        JsonObjectRequest jsonObjReq = new JsonObjectRequest(method, url, params, listener, errorListener) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                if (headers == null) {
+                    return new LinkedHashMap<>(0);
+                }
+                return headers;
+            }
+        };
+
+        jsonObjReq.setShouldCache(putInCache);
+        addRequestPolicy(jsonObjReq);
+
+        // Adding request to request queue
+        Wishurgift.get().addToRequestQueue(jsonObjReq, "req_object_" + url.hashCode());
+    }
+}

+ 42 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/CommentApi.java

@@ -0,0 +1,42 @@
+package com.androiddev.project.ili.wishurgift.api;
+
+import com.android.volley.Request;
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.util.Constants;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * Created by Ouahab FENNICHE on 19/04/2020
+ */
+public class CommentApi {
+
+    //GET
+    //Récupère les données d'un commentaire
+    public static void getCommentsByID(int id, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.COMMENT, id), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    //PUT
+    //Modifie un commentaire
+    public static void updateComment(int idComment,  String text,  Response.Listener listener, Response.ErrorListener errorListener) {
+        JSONObject params = new JSONObject();
+        try {
+            if(text!= null && !text.isEmpty()) {
+                params.put("text", text);
+            }
+
+
+            AppelApi.getJSONObjectWithParams(Request.Method.PUT, Constants.API_URL + String.format(Constants.UPDATE_COMMENT, idComment), AppelApi.getHeaderToken(), params, listener, errorListener, false);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    //DELETE
+    //Supprime un commentaire
+    public static void deleteComment(int idComment, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.DELETE, Constants.API_URL + String.format(Constants.DELETE_COMMENT, idComment), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+}

+ 60 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/ContactsApi.java

@@ -0,0 +1,60 @@
+package com.androiddev.project.ili.wishurgift.api;
+
+
+import com.android.volley.Request;
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.util.Constants;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+public class ContactsApi {
+
+    // GET
+    //Retourne tous les contacts de l'utilisateur connecté
+    public static void getContacts(Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + Constants.CONTACT_LIST, AppelApi.getHeaderToken(), listener, errorListener, false);
+
+    }
+
+    //Retourne les contacts de l'utilisateur connecté sous forme paginée
+    public static void getContactsFromUserPaginable(int numPage, int nbElt, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.CONTACT_LIST_PAGINABLE, numPage, nbElt), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    //Retourne la liste des utilisateurs ayant ajouté l'utilisateur connecté mais qui ne sont pas dans ses contacts.
+    public static void getContactsPending(Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.CONTACTS_PENDING), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    //Retourne la liste paginée des utilisateurs ayant ajouté l'utilisateur connecté mais qui ne sont pas dans ses contacts.
+    public static void getContactsNotInListFriendPaginable(int numPage, int nbElt, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.CONTACTS_PENDING_PAGINABLE, numPage, nbElt), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    //Retourne la liste des utilisateurs ajoutés par l'utilisateur connecté mais qui ne sont pas dans ses contacts.
+    public static void getContactsRequested(Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + Constants.CONTACTS_REQUESTED, AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    //Retourne la liste paginée des utilisateurs ajoutés par l'utilisateur connecté mais qui ne sont pas dans ses contacts.
+    public static void GetContactsRequestedPaginable(int numPage, int nbElt, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.CONTACTS_REQUESTED_PAGINABLE, numPage, nbElt), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    // POST
+    public static void addContactByTag(String tag, Response.Listener listener, Response.ErrorListener errorListener) {
+        JSONObject params = new JSONObject();
+        try {
+            params.put("tag", tag);
+            AppelApi.getJSONObjectWithParams(Request.Method.POST, Constants.API_URL + Constants.ADD_CONTACT, AppelApi.getHeaderToken(), params, listener, errorListener, false);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    // DELETE
+    public static void deleteContact(int user , Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.DELETE, Constants.API_URL + String.format(Constants.DELETE_CONTACTS, user), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+}

+ 76 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/ElementsApi.java

@@ -0,0 +1,76 @@
+package com.androiddev.project.ili.wishurgift.api;
+
+import com.android.volley.Request;
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.util.Constants;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+public class ElementsApi {
+    public static void getElementByID(int id, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.ELEMENT, id), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    public static void getElementCommentByID(int id, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.ELEMENT_COMMENTS, id), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    public static void getElementCommentByIDPaginable(int id, int numPage, int nbElt, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.ELEMENT_COMMENTS_PAGINABLE, id, numPage, nbElt), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    public static void addImageToElement(int id, String encodedImg, String extension, Response.Listener listener, Response.ErrorListener errorListener) {
+        JSONObject params = new JSONObject();
+        try {
+            params.put("ext", extension);
+            params.put("data", encodedImg);
+            AppelApi.getJSONObjectWithParams(Request.Method.POST, Constants.API_URL + String.format(Constants.ADD_IMG, id), AppelApi.getHeaderToken(), params, listener, errorListener, false);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static void addComment(int idElt, String comment, Response.Listener listener, Response.ErrorListener errorListener) {
+        JSONObject params = new JSONObject();
+        try {
+            params.put("text", comment);
+            AppelApi.getJSONObjectWithParams(Request.Method.POST, Constants.API_URL + String.format(Constants.ADD_COMMENT, idElt), AppelApi.getHeaderToken(), params, listener, errorListener, false);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static void updateElement(int idElt, String name, String link, String address, Double price, String description, Response.Listener listener, Response.ErrorListener errorListener) {
+        JSONObject params = new JSONObject();
+        try {
+            if(name!= null && !name.isEmpty()) {
+                params.put("name", name);
+            }
+            if(link!= null && !link.isEmpty()) {
+                params.put("link", link);
+            }
+            if(address!= null && !address.isEmpty()) {
+                params.put("address", address);
+            }
+            if (price != null  ) {
+                params.put("price", price);
+            }
+            if(description!= null && !description.isEmpty()) {
+                params.put("description", description);
+            }
+
+            AppelApi.getJSONObjectWithParams(Request.Method.PUT, Constants.API_URL + String.format(Constants.UPDATE_ELEMENT, idElt), AppelApi.getHeaderToken(), params, listener, errorListener, false);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static void updateStatus(int idElt, String newStatus, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.PUT, Constants.API_URL + String.format(Constants.UPDATE_STATUS, idElt, newStatus), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    public static void deleteElement(int idElt, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.DELETE, Constants.API_URL + String.format(Constants.DELETE_ELEMENT, idElt), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+}

+ 17 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/StatsApi.java

@@ -0,0 +1,17 @@
+package com.androiddev.project.ili.wishurgift.api;
+
+import com.android.volley.Request;
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.util.Constants;
+
+/**
+ * Created by Ouahab FENNICHE on 22/03/2020
+ */
+public class StatsApi {
+
+    // GET
+    //Statistique sur un utilisateur (l'utilisateur connecté peut uniquement accèder au statistique de ses contacts ou de lui même)
+    public static void getStatsById(int id, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.STATS, id), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+}

+ 96 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/UserApi.java

@@ -0,0 +1,96 @@
+package com.androiddev.project.ili.wishurgift.api;
+
+import com.android.volley.Request;
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.util.Constants;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.HashMap;
+
+public class UserApi {
+    /*
+     * @param id Id utilisateur
+     * @param listener listener
+     * @param errorListener listener d'erreur
+     * Appel à l'api pour l'utilisateur passé en paramètre.
+     * En cas de succès, la méthode onSuccess du listener est executé.
+     * En cas d'erreur methode onError de l'errorListener est executé
+     */
+    public static void getWishListsFromUser(int id, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.USER_LIST_WISHLIST, id), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    public static void getUserProfile(int id, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.USER_PROFILE, id), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+
+    public static void getUsersBySearchWithLimit(String searching, int capacity, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.USER_SEARCH_WITH_LIMIT, searching, capacity), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    public static void getWishListsFromUserPaginable(int id, int numPage, int nbElt, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.USER_LIST_WISHLIST_PAGINABLE, id, numPage, nbElt), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    public static void login(String login, String password, Response.Listener listener, Response.ErrorListener errorListener) {
+        JSONObject params = new JSONObject();
+        try {
+            params.put("login", login);
+            params.put("password", password);
+            AppelApi.getJSONObjectWithParams(Request.Method.POST, Constants.API_URL + Constants.LOGIN, new HashMap<String, String>(), params, listener, errorListener, false);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static void signIn(String name, String email, String password, Response.Listener listener, Response.ErrorListener errorListener) {
+        JSONObject params = new JSONObject();
+        try {
+            params.put("name", name);
+            params.put("password", password);
+            params.put("email", email);
+            AppelApi.getJSONObjectWithParams(Request.Method.POST, Constants.API_URL + Constants.SIGN_IN, new HashMap<String, String>(), params, listener, errorListener, false);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static void refreshToken(Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.PUT, Constants.API_URL + Constants.REFRESH_TOKEN, AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    public static void updateUser(String name, String email, String password, Boolean isPublic, Response.Listener listener, Response.ErrorListener errorListener) {
+        JSONObject params = new JSONObject();
+        try {
+            if (name != null && !name.isEmpty()) {
+                params.put("name", name);
+            }
+            if (email != null && !email.isEmpty()) {
+                params.put("email", email);
+            }
+            if (password != null && !password.isEmpty()) {
+                params.put("password", password);
+            }
+            if (isPublic != null) {
+                params.put("public", isPublic);
+            }
+            AppelApi.getJSONObjectWithParams(Request.Method.PUT, Constants.API_URL + String.format(Constants.UPDATE_USER), AppelApi.getHeaderToken(), params, listener, errorListener, false);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static void getSharedListFromUser(Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + Constants.USER_SHARED_LIST, AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    // Returns a paginated list of shared wish lists
+    public static void getWishListsSharedFromUserPaginable(int numPage, int nbElt, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.USER_SHARED_LIST_PAGINABLE, numPage, nbElt), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+
+}

+ 80 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/api/WishListApi.java

@@ -0,0 +1,80 @@
+package com.androiddev.project.ili.wishurgift.api;
+
+import com.android.volley.Request;
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.util.Constants;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+public class WishListApi {
+    public static void getWishListById(int id, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.GET, Constants.API_URL + String.format(Constants.WISHLIST, id), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    public static void createWishList(String name, Boolean is_public, Response.Listener listener, Response.ErrorListener errorListener) {
+        JSONObject params = new JSONObject();
+        try {
+            params.put("name", name);
+            params.put("public", is_public);
+            AppelApi.getJSONObjectWithParams(Request.Method.POST, Constants.API_URL + String.format(Constants.ADD_WISHLIST), AppelApi.getHeaderToken(), params, listener, errorListener, false);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+
+    }
+
+    // Supprime une liste
+    public static void deleteWishList(int id, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.DELETE, Constants.API_URL + String.format(Constants.DELETE_WISHLIST, id), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    // UNDOSHARE_WISHLIST
+    public static void undoSharingWishList(int id, int idUser, Response.Listener listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.DELETE, Constants.API_URL + String.format(Constants.UNDOSHARE_WISHLIST, id, idUser), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+
+    public static void addElementToWishList(int id, String name, String link, String address, Double price, String description, Response.Listener listener, Response.ErrorListener errorListener) {
+        JSONObject params = new JSONObject();
+        try {
+            params.put("name", name);
+
+            if (link != null && !link.isEmpty()) {
+                params.put("link", link);
+            }
+            if (address != null && !address.isEmpty()) {
+                params.put("address", address);
+            }
+            if (price != null) {
+                params.put("price", price);
+            }
+            if (description != null && !description.isEmpty()) {
+                params.put("description", description);
+            }
+            AppelApi.getJSONObjectWithParams(Request.Method.POST, Constants.API_URL + String.format(Constants.ADD_ITEM_WISHLIST, id), AppelApi.getHeaderToken(), params, listener, errorListener, false);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static void updateWishList(int id, String name, Boolean is_public, Response.Listener listener, Response.ErrorListener errorListener) {
+        JSONObject params = new JSONObject();
+        try {
+            if (name != null && !name.isEmpty()) {
+                params.put("name", name);
+            }
+            if (is_public != null) {
+                params.put("public", is_public);
+            }
+
+
+            AppelApi.getJSONObjectWithParams(Request.Method.PUT, Constants.API_URL + String.format(Constants.UPDATE_WISHLIST, id), AppelApi.getHeaderToken(), params, listener, errorListener, false);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static void shareWishList(int idWishList, int idUser, Response.Listener<String> listener, Response.ErrorListener errorListener) {
+        AppelApi.getString(Request.Method.PUT, Constants.API_URL + String.format(Constants.SHARE_WISHLIST, idWishList, idUser), AppelApi.getHeaderToken(), listener, errorListener, false);
+    }
+}

+ 38 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/application/Wishurgift.java

@@ -0,0 +1,38 @@
+package com.androiddev.project.ili.wishurgift.application;
+
+import android.app.Application;
+import android.text.TextUtils;
+
+import com.android.volley.Request;
+import com.android.volley.RequestQueue;
+import com.android.volley.toolbox.Volley;
+import com.androiddev.project.ili.wishurgift.util.SessionVariables;
+
+public class Wishurgift extends Application {
+    private static Wishurgift mInstance;
+    private ActivityLifecycleCallbacks mLifeCycle;
+    private RequestQueue mRequestQueue;
+    private static final SessionVariables sessionVariables=new SessionVariables();
+
+    @Override
+    public void onCreate(){
+        super.onCreate();
+
+        mInstance=this;
+        mRequestQueue= Volley.newRequestQueue(getApplicationContext());
+    }
+
+    public <T> void addToRequestQueue(Request<T> req, String tag) {
+
+        // set the default tag if tag is empty
+        req.setTag(TextUtils.isEmpty(tag) ? "log" : tag);
+        mInstance.mRequestQueue.add(req);
+    }
+
+    public static Wishurgift get(){
+        return mInstance;
+    }
+    public static SessionVariables getSessionVariables(){
+        return sessionVariables;
+    }
+}

+ 131 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/AddContactsFragment.java

@@ -0,0 +1,131 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.ContactsApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.google.gson.Gson;
+
+import org.json.JSONObject;
+
+public class AddContactsFragment extends Fragment {
+
+
+    Gson gson = new Gson();
+    private ProgressDialog pg;
+    TextView tag;
+    private Button addContactButton, cancelButton;
+
+    public AddContactsFragment() {
+
+    }
+
+    public static AddContactsFragment newInstance() {
+        AddContactsFragment fragmentContact = new AddContactsFragment();
+        return fragmentContact;
+    }
+
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+    }
+
+    @Nullable
+    @Override
+    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        if(Wishurgift.getSessionVariables().getUserConnected()==null || Wishurgift.getSessionVariables().getToken()==null){
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        View view = inflater.inflate(R.layout.fragment_add_contact, container, false);
+        tag = view.findViewById(R.id.tag_contact);
+        addContactButton = view.findViewById(R.id.addContact);
+        addContactButton.setOnClickListener(v -> AddContactBytag());
+        cancelButton = view.findViewById(R.id.cancelAddContact);
+        cancelButton.setOnClickListener(v -> exitAddContact());
+
+        return view;
+    }
+
+    private void exitAddContact() {
+
+        AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("Confirm exit");
+        alertDialogBuilder.setMessage("Are you sure you want to exit");
+        alertDialogBuilder.setCancelable(false);
+
+        alertDialogBuilder.setPositiveButton("Yes", (arg0, arg1) -> {
+
+            ((AppMainActivity) getActivity()).afficherListesContacts();
+        });
+
+        alertDialogBuilder.setNegativeButton("No", (dialog, which) -> dialog.cancel());
+
+        AlertDialog alertDialog = alertDialogBuilder.create();
+        alertDialog.show();
+    }
+
+    protected void onPreExecute() {
+        pg = new ProgressDialog(getContext(), R.style.AppTheme_Dark_Dialog);
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+    public void AddContactBytag() {
+        onPreExecute();
+        ContactsApi.addContactByTag(tag.getText().toString(), (Response.Listener<JSONObject>) response -> {
+            pg.dismiss();
+            ((AppMainActivity) getActivity()).afficherListesContacts();
+        }, error -> {
+            pg.dismiss();
+            AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+            alertDialogBuilder.setTitle("An error has occured");
+            alertDialogBuilder.setMessage("contact does not exist").setCancelable(false).setNeutralButton("ok", new DialogInterface.OnClickListener() {
+                @Override
+                public void onClick(DialogInterface dialog, int which) {
+                    ((AppMainActivity) getActivity()).afficherListesContacts();
+                }
+            });
+
+            AlertDialog alertDialog =alertDialogBuilder.create();
+            alertDialog.show();
+        });
+    }
+
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("User not found");
+        alertDialogBuilder.setMessage("We were unable to find this user").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                /*Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));*/
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}

+ 176 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/AddElementFragment.java

@@ -0,0 +1,176 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.EditText;
+
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.WishListApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+
+import org.json.JSONObject;
+
+/**
+ * A simple {@link Fragment} subclass.
+ * Use the {@link AddElementFragment#newInstance} factory method to
+ * create an instance of this fragment.
+ */
+public class AddElementFragment extends Fragment {
+
+    private static final String ARG_PARAM1 = "param1";
+    private EditText nomElement, lienElement, adresseElement, prixElement, descriptionElement;
+    private Button addEltButton, cancelButton;
+    private ProgressDialog pg;
+
+    // TODO: Rename and change types of parameters
+    private int idParent;
+
+    public AddElementFragment() {
+        // Required empty public constructor
+    }
+
+    /**
+     * Use this factory method to create a new instance of
+     * this fragment using the provided parameters.
+     *
+     * @param param1 Parameter 1.
+     * @return A new instance of fragment AddElementFragment.
+     */
+    // TODO: Rename and change types and number of parameters
+    public static AddElementFragment newInstance(int param1) {
+        AddElementFragment fragment = new AddElementFragment();
+        Bundle args = new Bundle();
+        args.putInt(ARG_PARAM1, param1);
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (getArguments() != null) {
+            idParent = getArguments().getInt(ARG_PARAM1);
+        }
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        // Inflate the layout for this fragment
+        if(Wishurgift.getSessionVariables().getUserConnected()==null || Wishurgift.getSessionVariables().getToken()==null){
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        final View view = inflater.inflate(R.layout.fragment_add_element, container, false);
+        nomElement = view.findViewById(R.id.elementTitle);
+        lienElement = view.findViewById(R.id.elementLink);
+        adresseElement = view.findViewById(R.id.elementAdresse);
+        prixElement = view.findViewById(R.id.elementPrice);
+        descriptionElement = view.findViewById(R.id.elementDescription);
+
+
+        addEltButton = view.findViewById(R.id.addElement);
+        addEltButton.setOnClickListener(v -> createElement());
+        cancelButton = view.findViewById(R.id.cancelAddElement);
+        cancelButton.setOnClickListener(v -> exitButton());
+        return view;
+    }
+
+
+
+    public void exitButton() {
+        AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());
+        // Setting Alert Dialog Title
+        alertDialogBuilder.setTitle("Confirm Exit");
+        // Icon Of Alert Dialog
+        //alertDialogBuilder.setIcon(R.drawable.question);
+        // Setting Alert Dialog Message
+        alertDialogBuilder.setMessage("Are you sure you want to exit");
+        alertDialogBuilder.setCancelable(false);
+
+        alertDialogBuilder.setPositiveButton("Yes", (arg0, arg1) -> returnToList(true));
+
+        alertDialogBuilder.setNegativeButton("No", (dialog, which) -> dialog.cancel());
+        alertDialogBuilder.setNeutralButton("Cancel", (dialog, which) -> dialog.cancel());
+
+        AlertDialog alertDialog = alertDialogBuilder.create();
+        alertDialog.show();
+    }
+
+    protected void onPreExecute() {
+        pg = new ProgressDialog(getContext(), R.style.AppTheme_Dark_Dialog);
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+
+    public void createElement() {
+        onPreExecute();
+        Double prixD;
+        String prixS = prixElement.getText().toString();
+        if (prixS == null || prixS.isEmpty()) {
+            prixD = null;
+        } else {
+            try {
+                prixD = Double.parseDouble(prixS);
+            } catch (NumberFormatException e) {
+                prixD = null;
+            }
+        }
+        WishListApi.addElementToWishList(idParent, nomElement.getText().toString(), lienElement.getText().toString(), adresseElement.getText().toString(), prixD, descriptionElement.getText().toString(), new Response.Listener<JSONObject>() {
+
+            @Override
+            public void onResponse(JSONObject response) {
+
+                //response
+                pg.dismiss();
+                returnToList(true);
+            }
+        }, error -> {
+            pg.dismiss();
+            onError();
+        });
+
+    }
+
+    public void returnToList(boolean appartient) {
+        ((AppMainActivity) getActivity()).afficherContenuWishList(idParent, appartient);
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+
+
+
+
+
+
+}

+ 128 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/AddWishListFragment.java

@@ -0,0 +1,128 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.EditText;
+
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.WishListApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+
+import org.json.JSONObject;
+
+/**
+ * A simple {@link Fragment} subclass.
+ * Use the {@link AddWishListFragment#newInstance} factory method to
+ * create an instance of this fragment.
+ */
+public class AddWishListFragment extends Fragment {
+    CheckBox checkPublic;
+    EditText titleWishlist;
+    Button addImageButton,cancelButton;
+    private ProgressDialog pg;
+    /**
+     * Use this factory method to create a new instance of
+     * this fragment using the provided parameters.
+     * @return A new instance of fragment AddWishListFragment.
+     */
+    // TODO: Rename and change types and number of parameters
+    public static AddWishListFragment newInstance() {
+        AddWishListFragment fragment = new AddWishListFragment();
+        return fragment;
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        if(Wishurgift.getSessionVariables().getUserConnected()==null || Wishurgift.getSessionVariables().getToken()==null){
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        View view= inflater.inflate(R.layout.fragment_add_wish_list, container, false);
+        // Inflate the layout for this fragment
+        checkPublic=view.findViewById(R.id.chkPublic);
+        titleWishlist=view.findViewById(R.id.titleWishlist);
+        addImageButton=view.findViewById(R.id.addWishlist);
+        addImageButton.setOnClickListener(v -> createWishList());
+        cancelButton = view.findViewById(R.id.cancelAddwishlist);
+        cancelButton.setOnClickListener(v -> exitButton());
+        return view;
+    }
+
+    protected void onPreExecute() {
+        pg = new ProgressDialog(getContext(), R.style.AppTheme_Dark_Dialog);
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+
+    /**
+     * creation of a wishlist
+     */
+    public void createWishList(){
+        onPreExecute();
+        WishListApi.createWishList(titleWishlist.getText().toString(), checkPublic.isChecked(), (Response.Listener<JSONObject>) response -> {
+            //response
+            pg.dismiss();
+            returnToList();
+        }, error -> {
+            onError();
+        });
+    }
+
+    public void returnToList(){
+        ((AppMainActivity) getActivity()).afficherWishListList();
+    }
+
+
+    public void exitButton(){
+        AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("Confirm exit");
+        alertDialogBuilder.setMessage("Are you sure you want to exit");
+        alertDialogBuilder.setCancelable(false);
+
+        alertDialogBuilder.setPositiveButton("Yes", (arg0, arg1) -> returnToList());
+
+        alertDialogBuilder.setNegativeButton("No", (dialog, which) -> dialog.cancel());
+
+        AlertDialog alertDialog = alertDialogBuilder.create();
+        alertDialog.show();
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}

+ 199 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/EditElementFragment.java

@@ -0,0 +1,199 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.EditText;
+
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.ElementsApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.Element;
+import com.google.gson.Gson;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * A simple {@link Fragment} subclass.
+ * Use the {@link EditElementFragment#newInstance} factory method to
+ * create an instance of this fragment.
+ */
+public class EditElementFragment extends Fragment {
+    // TODO: Rename parameter arguments, choose names that match
+    // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
+    private static final String ARG_PARAM1 = "param1";
+    private static final String ARG_PARAM2 = "param2";
+
+    // TODO: Rename and change types of parameters
+    private String mParam1;
+    private String mParam2;
+
+    private int idParent, idElt;
+    private EditText newNameElement, newLinkElement, newAddressElement, newPriceElement, newDescriptionElement;
+    private Button saveUpdateElement, cancelEditElement;
+
+    Gson gson = new Gson();
+    private ProgressDialog pg;
+    private boolean appartient;
+
+    public EditElementFragment() {
+        // Required empty public constructor
+    }
+
+    /**
+     * Use this factory method to create a new instance of
+     * this fragment using the provided parameters.
+     *
+     * @param param1 Parameter 1.
+     * @param param2 Parameter 2.
+     * @return A new instance of fragment EditElementFragment.
+     */
+    // TODO: Rename and change types and number of parameters
+    public static EditElementFragment newInstance(int param1, int param2) {
+        EditElementFragment fragment = new EditElementFragment();
+        Bundle args = new Bundle();
+        args.putInt(ARG_PARAM1, param1);
+        args.putInt(ARG_PARAM2, param2);
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (getArguments() != null) {
+            idParent = getArguments().getInt(ARG_PARAM1);
+            idElt = getArguments().getInt(ARG_PARAM2);
+        }
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        // Inflate the layout for this fragment
+        if(Wishurgift.getSessionVariables().getUserConnected()==null || Wishurgift.getSessionVariables().getToken()==null){
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        View view = inflater.inflate(R.layout.fragment_edit_element, container, false);
+
+
+        newNameElement = view.findViewById(R.id.newNameElement);
+        newLinkElement = view.findViewById(R.id.newLinkElement);
+        newAddressElement = view.findViewById(R.id.newAddressElement);
+        newPriceElement = view.findViewById(R.id.newPriceElement);
+        newDescriptionElement = view.findViewById(R.id.newDescriptionElement);
+
+        saveUpdateElement = view.findViewById(R.id.saveUpdateElement);
+        saveUpdateElement.setOnClickListener(v -> updateElement());
+        cancelEditElement = view.findViewById(R.id.cancelEditElement);
+        cancelEditElement.setOnClickListener(v -> cancelEditElement());
+        return view;
+    }
+
+    protected void onPreExecute() {
+        pg = new ProgressDialog(getContext(), R.style.AppTheme_Dark_Dialog);
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+
+    private void updateElement() {
+        Double prixD;
+        String prixS = newPriceElement.getText().toString();
+        if (prixS == null || prixS.isEmpty()) {
+            prixD = null;
+        } else {
+            try {
+                prixD = Double.parseDouble(prixS);
+            } catch (NumberFormatException e) {
+                prixD = null;
+            }
+        }
+        onPreExecute();
+        ElementsApi.updateElement(idElt, newNameElement.getText().toString(), newLinkElement.getText().toString(), newAddressElement.getText().toString(), prixD, newDescriptionElement.getText().toString(), response -> {
+            pg.dismiss();
+            afficherElement();
+        }, error -> {
+            pg.dismiss();
+            onError();
+        });
+
+    }
+
+    private void afficherElement() {
+        onPreExecute();
+        ElementsApi.getElementByID(idElt, (Response.Listener<String>) response -> {
+            try {
+                JSONObject jsonObject = new JSONObject(response);
+                Element elt = gson.fromJson(jsonObject.getJSONObject("data").toString(), Element.class);
+                newNameElement.setText(elt.getName());
+                newLinkElement.setText(elt.getLink());
+                newAddressElement.setText(elt.getAddress());
+                newPriceElement.setText(String.valueOf(elt.getPrice()));
+                newDescriptionElement.setText(elt.getDescription());
+                pg.dismiss();
+                ((AppMainActivity) getActivity()).afficherElement(idParent, idElt, appartient);
+
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+    }
+
+
+    /**
+     * gestion cancel
+     */
+
+    public void cancelEditElement() {
+        AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());
+        // Setting Alert Dialog Title
+        alertDialogBuilder.setTitle("Confirm exit");
+        // Icon Of Alert Dialog
+        //alertDialogBuilder.setIcon(R.drawable.question);
+        // Setting Alert Dialog Message
+        alertDialogBuilder.setMessage("Are you sure you want to exit");
+        alertDialogBuilder.setCancelable(false);
+
+        alertDialogBuilder.setPositiveButton("Yes", (arg0, arg1) -> ((AppMainActivity) getActivity()).afficherElement(idParent, idElt, appartient));
+
+        alertDialogBuilder.setNegativeButton("No", (dialog, which) -> dialog.cancel());
+
+        AlertDialog alertDialog = alertDialogBuilder.create();
+        alertDialog.show();
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}

+ 157 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/EditProfilFragment.java

@@ -0,0 +1,157 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.UserApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.User;
+import com.google.gson.Gson;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * Created by Ouahab FENNICHE on 13/04/2020
+ */
+public class EditProfilFragment extends Fragment {
+    private static final String ARG_PARAM1 = "param1";
+    private int idUser;
+    private TextView newName, newEmail;
+    CheckBox newVisibility;
+    Button saveNewProfil, cancelEditAccount;
+    private Gson gson = new Gson();
+    private ProgressDialog pg;
+
+
+    public EditProfilFragment() {
+
+    }
+
+    public static EditProfilFragment newInstance(int idUser) {
+        EditProfilFragment fragment = new EditProfilFragment();
+        Bundle args = new Bundle();
+        args.putInt(ARG_PARAM1, idUser);
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (getArguments() != null) {
+            idUser = getArguments().getInt(ARG_PARAM1);
+        }
+    }
+
+    @Nullable
+    @Override
+    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        if (Wishurgift.getSessionVariables().getUserConnected() == null || Wishurgift.getSessionVariables().getToken() == null) {
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        View view = inflater.inflate(R.layout.edit_account_information, container, false);
+        newName = view.findViewById(R.id.newName);
+        newEmail = view.findViewById(R.id.newEmail);
+        newVisibility = view.findViewById(R.id.new_profil_chkpublic);
+        saveNewProfil = view.findViewById(R.id.saveNewProfil);
+        saveNewProfil.setOnClickListener(v -> saveChangeInfo());
+        cancelEditAccount = view.findViewById(R.id.cancelEditAccount);
+        cancelEditAccount.setOnClickListener(v -> exitEditAccount());
+
+        return view;
+    }
+
+
+    protected void onPreExecute() {
+        pg = new ProgressDialog(getContext(), R.style.AppTheme_Dark_Dialog);
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+
+    /**
+     * Function to update account info (name, email, public or not)
+     */
+
+    private void saveChangeInfo() {
+        UserApi.updateUser(newName.getText().toString(), newEmail.getText().toString(), null, newVisibility.isChecked(), response -> afficherProfilInfo(), error -> {
+            onError();
+        });
+    }
+
+    private void afficherProfilInfo() {
+        onPreExecute();
+        UserApi.getUserProfile(idUser, (Response.Listener<String>) response -> {
+            try {
+                JSONObject jsonObject = new JSONObject(response);
+                User usr = gson.fromJson(jsonObject.getJSONObject("data").toString(), User.class);
+                newName.setText(usr.getUserName());
+                newEmail.setText(usr.getEmail());
+                newVisibility.setChecked(usr.getPublic());
+                pg.dismiss();
+                showProfil();
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+
+    }
+
+    public void exitEditAccount() {
+        AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("Confirm exit");
+        alertDialogBuilder.setMessage("Are you sure you want to exit");
+        alertDialogBuilder.setCancelable(false);
+        alertDialogBuilder.setPositiveButton("Yes", (arg0, arg1) -> showProfil());
+        alertDialogBuilder.setNegativeButton("No", (dialog, which) -> dialog.cancel());
+        AlertDialog alertDialog = alertDialogBuilder.create();
+        alertDialog.show();
+    }
+
+
+    private void showProfil() {
+        ((AppMainActivity) getActivity()).afficherProfil(idUser);
+
+    }
+
+    public void onError() {
+        AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity) getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog = alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}
+

+ 273 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/ElementFragment.java

@@ -0,0 +1,273 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.adapter.CommentaireAdapter;
+import com.androiddev.project.ili.wishurgift.api.ElementsApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.Commentaire;
+import com.androiddev.project.ili.wishurgift.model.Element;
+import com.google.gson.Gson;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * A simple {@link Fragment} subclass.
+ * Use the {@link ElementFragment#newInstance} factory method to
+ * create an instance of this fragment.
+ */
+public class ElementFragment extends Fragment {
+    // TODO: Rename parameter arguments, choose names that match
+    // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
+    private static final String ARG_PARAM1 = "param1";
+    private static final String ARG_PARAM2 = "param2";
+    private static final String ARG_PARAM3 = "param3";
+    // TODO: Rename and change types of parameters
+    private int idParent, idElt;
+    private boolean appartient;
+    TextView nomElt, linkElt, eltAdresse, eltPrice, eltDescription, eltStatus;
+    Button buttonAcheter, buttonUrgent, buttonReserver, buttonSupprimer, buttonAddComment, buttonEditElement;
+    EditText commentaire;
+    ImageView imgElement;
+    Gson gson = new Gson();
+    List<Commentaire> commentaires = new ArrayList<>();
+    CommentaireAdapter commentaireAdapter;
+    LinearLayout linkLayout, adresseLayout;
+    private ProgressDialog pg;
+
+    public ElementFragment() {
+        // Required empty public constructor
+    }
+
+    /**
+     * Use this factory method to create a new instance of
+     * this fragment using the provided parameters.
+     *
+     * @param idParent   Parameter 1.
+     * @param id         Parameter 2.
+     * @param appartient Parameter 3
+     * @return A new instance of fragment ElementFragment.
+     */
+    // TODO: Rename and change types and number of parameters
+    public static ElementFragment newInstance(int idParent, int id, boolean appartient) {
+        ElementFragment fragment = new ElementFragment();
+        Bundle args = new Bundle();
+        args.putInt(ARG_PARAM1, idParent);
+        args.putInt(ARG_PARAM2, id);
+        args.putBoolean(ARG_PARAM3, appartient);
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (getArguments() != null) {
+            idParent = getArguments().getInt(ARG_PARAM1);
+            idElt = getArguments().getInt(ARG_PARAM2);
+            appartient = getArguments().getBoolean(ARG_PARAM3);
+        }
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        if(Wishurgift.getSessionVariables().getUserConnected()==null || Wishurgift.getSessionVariables().getToken()==null){
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        // Inflate the layout for this fragment
+        View view = inflater.inflate(R.layout.fragment_element, container, false);
+        nomElt = view.findViewById(R.id.nomElt);
+        linkElt = view.findViewById(R.id.linkElt);
+        linkLayout = view.findViewById(R.id.layoutUrlElt);
+        linkLayout.setOnClickListener(v -> {
+            Log.d("log", "clic");
+            String link = linkElt.getText().toString();
+            if (link != null && link.startsWith("http://") || link.startsWith("https://")) {
+                startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(link)));
+            }
+        });
+        eltAdresse = view.findViewById(R.id.adresseElt);
+        adresseLayout = view.findViewById(R.id.layoutAdresseElt);
+        adresseLayout.setOnClickListener(v -> {
+            String adresse = eltAdresse.getText().toString();
+            if (adresse != null) {
+                Uri intentUri = Uri.parse("geo:0,0?q=" + adresse);
+                Intent mapIntent = new Intent(Intent.ACTION_VIEW, intentUri);
+                mapIntent.setPackage("com.google.android.apps.maps");
+                if (mapIntent.resolveActivity(getActivity().getPackageManager()) != null) {
+                    startActivity(mapIntent);
+                }
+            }
+        });
+        eltPrice = view.findViewById(R.id.eltPrice);
+        eltDescription = view.findViewById(R.id.eltDescription);
+        eltStatus = view.findViewById(R.id.eltStatus);
+        buttonSupprimer = view.findViewById(R.id.supprimerElement);
+        buttonAcheter = view.findViewById(R.id.boutonAcheter);
+        buttonReserver = view.findViewById(R.id.boutonReserver);
+        buttonUrgent = view.findViewById(R.id.boutonUrgent);
+        afficherDonnees();
+        commentaire = view.findViewById(R.id.addCommentText);
+        buttonAddComment = view.findViewById(R.id.addCommentButton);
+        buttonAddComment.setOnClickListener(v -> {
+            envoyerCommentaire();
+            commentaire.getText().clear();
+
+
+        });
+        buttonEditElement = view.findViewById(R.id.editElementButton);
+        buttonEditElement.setOnClickListener(v -> ((AppMainActivity) getActivity()).updateElement(idParent, idElt));
+        ListView listView = view.findViewById(R.id.listeCommentaire);
+        commentaireAdapter = new CommentaireAdapter(getActivity(), commentaires);
+        commentaireAdapter.setIdParent(idParent);
+        commentaireAdapter.setAppartient(appartient);
+        commentaireAdapter.setIdElement(idElt);
+        afficherCommentaires();
+        listView.setAdapter(commentaireAdapter);
+        return view;
+    }
+    protected void onPreExecute() {
+        pg = new ProgressDialog(getContext(), R.style.AppTheme_Dark_Dialog);
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+
+
+    private void envoyerCommentaire() {
+        onPreExecute();
+        ElementsApi.addComment(idElt, commentaire.getText().toString(), response -> {
+                    pg.dismiss();
+                    afficherCommentaires();
+                }
+                , error -> {
+            onError();
+        });
+    }
+
+    private void afficherDonnees() {
+        onPreExecute();
+        ElementsApi.getElementByID(idElt, (Response.Listener<String>) response -> {
+            try {
+                JSONObject jsonObject = new JSONObject(response);
+                Element elt = gson.fromJson(jsonObject.getJSONObject("data").toString(), Element.class);
+                nomElt.setText(elt.getName());
+                linkElt.setText(elt.getLink());
+                eltAdresse.setText(elt.getAddress());
+                eltPrice.setText(String.valueOf(elt.getPrice()));
+                eltDescription.setText(elt.getDescription());
+                eltStatus.setText(elt.getStatus());
+                afficherBoutonsAppartient(elt.getStatus());
+                pg.dismiss();
+                buttonSupprimer.setVisibility(View.VISIBLE);
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+    }
+
+    private void afficherCommentaires() {
+        ElementsApi.getElementCommentByID(idElt, (Response.Listener<String>) response -> {
+            try {
+                JSONObject jsonObject = new JSONObject(response);
+                updateComments(Arrays.asList(gson.fromJson(jsonObject.getJSONObject("data").getJSONArray("list").toString(), Commentaire[].class)));
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+    }
+
+    private void updateComments(List<Commentaire> asList) {
+        commentaires.clear();
+        commentaires.addAll(asList);
+        Log.d("log", String.valueOf(asList.size()));
+        commentaireAdapter.notifyDataSetChanged();
+    }
+
+    private void afficherBoutonsAppartient(String status) {
+        buttonReserver.setVisibility(View.GONE);
+        buttonUrgent.setVisibility(View.GONE);
+        buttonAcheter.setVisibility(View.GONE);
+        buttonSupprimer.setVisibility(View.GONE);
+        if (appartient) {
+            if (!status.equals("purchased")) {
+                buttonSupprimer.setVisibility(View.VISIBLE);
+                buttonSupprimer.setOnClickListener(v -> supprimerElement());
+            }
+            if (status.equals("idea")) {
+                buttonUrgent.setVisibility(View.VISIBLE);
+                buttonUrgent.setOnClickListener(v -> updateElement("crush"));
+            }
+        } else if (status.equals("idea") || status.equals("crush")) {
+            buttonReserver.setVisibility(View.VISIBLE);
+            buttonReserver.setOnClickListener(v -> updateElement("reserved"));
+        } else if (status.equals("reserved")) {
+            updateElement("purchased");
+        }
+    }
+
+    private void updateElement(String newElement) {
+        ElementsApi.updateStatus(idElt, newElement, response -> afficherDonnees(), error -> {
+            onError();
+        });
+    }
+
+    private void supprimerElement() {
+        onPreExecute();
+        ElementsApi.deleteElement(idElt, response -> ((AppMainActivity) getActivity()).afficherContenuWishList(idParent, appartient), error -> {
+            pg.dismiss();
+            onError();
+        });
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}

+ 251 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/ListeContactsFragment.java

@@ -0,0 +1,251 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.EditText;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.adapter.ContactAdapter;
+import com.androiddev.project.ili.wishurgift.adapter.ContactPendingAdapter;
+import com.androiddev.project.ili.wishurgift.adapter.ContactSearchAdapter;
+import com.androiddev.project.ili.wishurgift.api.ContactsApi;
+import com.androiddev.project.ili.wishurgift.api.UserApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.User;
+import com.google.gson.Gson;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * A simple {@link Fragment} subclass.
+ * Use the {@link ListeContactsFragment#newInstance} factory method to
+ * create an instance of this fragment.
+ */
+public class ListeContactsFragment extends Fragment {
+
+
+    List<User> contactList = new ArrayList<>();
+    List<User> contactRequestedList = new ArrayList<>();
+    List<User> contactPendingList = new ArrayList<>();
+    List<User> contactListFound = new ArrayList<>();
+    ContactAdapter contactAdapter;
+    ContactAdapter contactRequestedAdapter;
+    ContactPendingAdapter contactPendingAdapter;
+    ContactSearchAdapter contactFoundAdapter;
+    private TextView addContactByTag;
+    Gson gson = new Gson();
+    private EditText zonesearchContacts;
+    private ProgressDialog pg;
+
+    public ListeContactsFragment() {
+    }
+
+    /**
+     * Use this factory method to create a new instance of
+     * this fragment using the provided parameters.
+     *
+     * @return A new instance of fragment ListeContacts.
+     */
+    // TODO: Rename and change types and number of parameters
+    public static ListeContactsFragment newInstance() {
+        ListeContactsFragment fragment = new ListeContactsFragment();
+        return fragment;
+    }
+
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        if(Wishurgift.getSessionVariables().getUserConnected()==null || Wishurgift.getSessionVariables().getToken()==null){
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        View view = inflater.inflate(R.layout.fragment_list_contacts, container, false);
+        ListView listView = view.findViewById(R.id.myContactList);
+        trouverContacts();
+        contactAdapter = new ContactAdapter(getActivity(), contactList);
+        listView.setAdapter(contactAdapter);
+        ListView listView2 = view.findViewById(R.id.requestedContactList);
+        trouverContactsRequested();
+        contactRequestedAdapter = new ContactAdapter(getActivity(), contactRequestedList);
+        listView2.setAdapter(contactRequestedAdapter);
+
+        ListView listView3 = view.findViewById(R.id.pendingContactList);
+        trouverContactsPending();
+        contactPendingAdapter = new ContactPendingAdapter(getActivity(), contactPendingList);
+        listView3.setAdapter(contactPendingAdapter);
+
+        ListView listViewSearch = view.findViewById(R.id.myContactListFindBySearch);
+        zonesearchContacts = view.findViewById(R.id.contactssearchbar);
+        zonesearchContacts.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+            }
+
+            @Override
+            public void onTextChanged(CharSequence s, int start, int before, int count) {
+                searchAllContacts(zonesearchContacts.getText().toString());
+            }
+
+            @Override
+            public void afterTextChanged(Editable s) {
+
+            }
+        });
+
+        contactFoundAdapter = new ContactSearchAdapter(getActivity(), contactListFound);
+        listViewSearch.setAdapter(contactFoundAdapter);
+        addContactByTag = view.findViewById(R.id.addContactList);
+        addContactByTag.setOnClickListener(v -> afficherAjouterContacts());
+
+
+        return view;
+    }
+
+
+    private void searchAllContacts(String texte) {
+        if(!texte.isEmpty()) {
+            UserApi.getUsersBySearchWithLimit(texte, 0, (Response.Listener<String>) response -> {
+                JSONObject jsonObject = null;
+                try {
+                    jsonObject = new JSONObject(response);
+                    JSONArray jsonArray = jsonObject.getJSONObject("data").getJSONArray("list");
+                    updateListeUserFoundBySearch(Arrays.asList(gson.fromJson(jsonArray.toString(), User[].class)));
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+            }, error -> {
+                onError();
+            });
+        } else{
+            updateListeUserFoundBySearch(new ArrayList<>());
+        }
+    }
+
+    private void updateListeUserFoundBySearch(List<User> newList) {
+        contactListFound.clear();
+        contactListFound.addAll(newList);
+        contactFoundAdapter.notifyDataSetChanged();
+    }
+
+    protected void onPreExecute() {
+        pg = new ProgressDialog(getContext(), R.style.AppTheme_Dark_Dialog);
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+    private void trouverContacts() {
+        onPreExecute();
+        ContactsApi.getContacts((Response.Listener<String>) response -> {
+            JSONObject jsonObject = null;
+            try {
+                jsonObject = new JSONObject(response);
+                JSONArray jsonArray = jsonObject.getJSONObject("data").getJSONArray("list");
+                updateListeContact(Arrays.asList(gson.fromJson(jsonArray.toString(), User[].class)));
+                pg.dismiss();
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+    }
+
+    private void trouverContactsRequested() {
+        ContactsApi.getContactsRequested((Response.Listener<String>) response -> {
+            JSONObject jsonObject = null;
+            try {
+                jsonObject = new JSONObject(response);
+                JSONArray jsonArray = jsonObject.getJSONObject("data").getJSONArray("list");
+                updateListeContactRequested(Arrays.asList(gson.fromJson(jsonArray.toString(), User[].class)));
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+    }
+
+    private void trouverContactsPending() {
+        ContactsApi.getContactsPending((Response.Listener<String>) response -> {
+            JSONObject jsonObject = null;
+            try {
+                jsonObject = new JSONObject(response);
+                JSONArray jsonArray = jsonObject.getJSONObject("data").getJSONArray("list");
+                updateListeContactPending(Arrays.asList(gson.fromJson(jsonArray.toString(), User[].class)));
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+    }
+
+    private void updateListeContact(List<User> newList) {
+        contactList.clear();
+        contactList.addAll(newList);
+        contactAdapter.notifyDataSetChanged();
+    }
+
+    private void updateListeContactPending(List<User> newList) {
+        contactPendingList.clear();
+        contactPendingList.addAll(newList);
+        contactPendingAdapter.notifyDataSetChanged();
+    }
+
+    private void updateListeContactRequested(List<User> newList) {
+        contactRequestedList.clear();
+        contactRequestedList.addAll(newList);
+        contactRequestedAdapter.notifyDataSetChanged();
+    }
+
+    public void afficherAjouterContacts() {
+        ((AppMainActivity) getActivity()).afficherAjoutContact();
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}

+ 187 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/MyListFragment.java

@@ -0,0 +1,187 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.adapter.WishListAdapter;
+import com.androiddev.project.ili.wishurgift.adapter.WishSharedAdapter;
+import com.androiddev.project.ili.wishurgift.api.UserApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.WishList;
+import com.google.gson.Gson;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * A simple {@link Fragment} subclass.
+ * Activities that contain this fragment must implement the
+ * {@link MyListFragment.OnFragmentInteractionListener} interface
+ * to handle interaction events.
+ * Use the {@link MyListFragment#newInstance} factory method to
+ * create an instance of this fragment.
+ */
+public class MyListFragment extends Fragment {
+
+    private ArrayList<WishList> wishLists = new ArrayList<>();
+    private ArrayList<WishList> wishSharedLists = new ArrayList<>();
+    private Gson gson = new Gson();
+    private WishListAdapter wishListAdapter;
+    private WishSharedAdapter wishSharedAdapter;
+    private TextView addNewWishlist;
+    private ProgressDialog pg;
+
+    public MyListFragment() {
+        // Required empty public constructor
+    }
+
+    public static MyListFragment newInstance() {
+        MyListFragment myListFragment = new MyListFragment();
+        return myListFragment;
+
+    }
+
+
+    @Nullable
+    @Override
+    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        View view = inflater.inflate(R.layout.fragment_my_list_dashboard, container, false);
+        if(Wishurgift.getSessionVariables().getUserConnected()==null || Wishurgift.getSessionVariables().getToken()==null){
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        getListItems();
+        ListView listView = view.findViewById(R.id.myListList);
+        wishListAdapter = new WishListAdapter(getActivity(), wishLists);
+        listView.setAdapter(wishListAdapter);
+        listView.setOnItemClickListener((parent, view1, position, id) -> {
+            WishList selectedItem = (WishList) parent.getItemAtPosition(position);
+            afficherDetail(selectedItem, true);
+        });
+        getListItemsShared();
+        ListView listView1 = view.findViewById(R.id.mySharedList);
+        wishSharedAdapter = new WishSharedAdapter(getActivity(), wishSharedLists);
+        listView1.setAdapter(wishSharedAdapter);
+        listView1.setOnItemClickListener((parent, view12, position, id) -> {
+            WishList selectedItem = (WishList) parent.getItemAtPosition(position);
+            afficherDetail(selectedItem, false);
+        });
+        addNewWishlist = view.findViewById(R.id.addWishlist);
+        addNewWishlist.setOnClickListener(v -> afficherAjouterWishlist());
+        return view;
+    }
+
+
+    protected void onPreExecute() {
+        pg = new ProgressDialog(getContext(), R.style.AppTheme_Dark_Dialog);
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+
+    public void getListItems() {
+        onPreExecute();
+        List<String> items = new ArrayList<>();
+        UserApi.getWishListsFromUser(Wishurgift.getSessionVariables().getUserConnected().getId(), new Response.Listener<String>() {
+            @Override
+            public void onResponse(String response) {
+                try {
+                    Log.d("log", "success : " + response);
+                    JSONObject jsonObject = new JSONObject(response);
+                    JSONArray jsonArray = jsonObject.getJSONObject("data").getJSONArray("list");
+                    updateWishList(Arrays.asList(gson.fromJson(jsonArray.toString(), WishList[].class)));
+                    pg.dismiss();
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+            }
+        }, error -> onError());
+
+    }
+
+    public void getListItemsShared() {
+        List<String> items = new ArrayList<>();
+        UserApi.getSharedListFromUser((Response.Listener<String>) response -> {
+            try {
+                JSONObject jsonObject = new JSONObject(response);
+                JSONArray jsonArray = jsonObject.getJSONObject("data").getJSONArray("list");
+
+                updateWishListShared(Arrays.asList(gson.fromJson(jsonArray.toString(), WishList[].class)));
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> onError());
+    }
+
+    public void updateWishList(List<WishList> newList) {
+        wishLists.clear();
+        wishLists.addAll(newList);
+        wishListAdapter.notifyDataSetChanged();
+    }
+
+    public void updateWishListShared(List<WishList> newList) {
+        wishSharedLists.clear();
+        wishSharedLists.addAll(newList);
+        wishSharedAdapter.notifyDataSetChanged();
+    }
+
+    public void deleteWishList(WishList toDelete) {
+        //delete
+        Log.d("delete", "item " + toDelete.getId() + "deleted");
+    }
+
+    public void afficherDetail(WishList toView, boolean appartient) {
+
+        //view
+        if (toView != null)
+        ((AppMainActivity) getActivity()).afficherContenuWishList(toView.getId(), appartient);
+
+    }
+
+    public void afficherAjouterWishlist() {
+
+        ((AppMainActivity) getActivity()).afficherAjouterWishList();
+
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}

+ 160 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/ProfilFragment.java

@@ -0,0 +1,160 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.StatsApi;
+import com.androiddev.project.ili.wishurgift.api.UserApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.ContactStats;
+import com.androiddev.project.ili.wishurgift.model.User;
+import com.bumptech.glide.Glide;
+import com.google.gson.Gson;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+public class ProfilFragment extends Fragment {
+    private static final String ARG_PARAM1 = "param1";
+    private Gson gson = new Gson();
+    private int idUser;
+    private TextView name, name1, email, tag, tag2, myStats;
+    CheckBox checkPublic;
+    private ImageView imgavatar;
+    Button updateProfil;
+    private ProgressDialog pg;
+
+    public ProfilFragment() {
+
+    }
+
+    public static ProfilFragment newInstance(int idUser) {
+        ProfilFragment fragment = new ProfilFragment();
+        Bundle args = new Bundle();
+        args.putInt(ARG_PARAM1, idUser);
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (getArguments() != null) {
+            idUser = getArguments().getInt(ARG_PARAM1);
+        }
+    }
+
+    @Nullable
+    @Override
+    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        if(Wishurgift.getSessionVariables().getUserConnected()==null || Wishurgift.getSessionVariables().getToken()==null){
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        final View view = inflater.inflate(R.layout.fragment_show_profil, container, false);
+        name = view.findViewById(R.id.profil_name);
+        name1 = view.findViewById(R.id.profil_nameinf);
+        email = view.findViewById(R.id.profil_email);
+        tag = view.findViewById(R.id.profil_tag);
+        tag2 = view.findViewById(R.id.profil_tag2);
+        checkPublic = view.findViewById(R.id.profil_chkpublic);
+        imgavatar = view.findViewById(R.id.profile_image);
+        afficherProfil();
+        updateProfil = view.findViewById(R.id.updateProfil);
+        updateProfil.setOnClickListener(v -> ((AppMainActivity) getActivity()).updateProfil(idUser));
+
+        myStats = view.findViewById(R.id.myStats);
+        afficherMyStat();
+        return view;
+    }
+
+    private void afficherMyStat() {
+
+        StatsApi.getStatsById(idUser, (Response.Listener<String>) response -> {
+            try {
+                JSONObject jsonObject = new JSONObject(response);
+                ContactStats contactStats = gson.fromJson(jsonObject.getJSONObject("data").toString(), ContactStats.class);
+                myStats.setText("number of Wishlist : " + contactStats.getNbWishlist() + "\n Number of elements : " + contactStats.getNbElement() +
+                        "\n Number of contacts : " + contactStats.getNbContact() + "\n idea : " + contactStats.getNbIdea() +
+                        " crush : " + contactStats.getNbCrush() + " , reserved : " + contactStats.getNbReserved() +
+                        "\n purchased : " + contactStats.getNbPurchased() + " , Average price : " + contactStats.getNbAveragePrice() +
+                        "\n Lowest price : " + contactStats.getNbLowestPrice() + " , Highest price : " + contactStats.getNbHighestPrice());
+
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+
+    }
+
+    protected void onPreExecute() {
+        pg = new ProgressDialog(getContext(), R.style.AppTheme_Dark_Dialog);
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+
+    public void afficherProfil() {
+        onPreExecute();
+        UserApi.getUserProfile(idUser, (Response.Listener<String>) response -> {
+            try {
+                JSONObject jsonObject = new JSONObject(response);
+                User usr = gson.fromJson(jsonObject.getJSONObject("data").toString(), User.class);
+                name.setText(usr.getUserName());
+                name1.setText(usr.getUserName());
+                email.setText(usr.getEmail());
+                tag.setText(usr.getTag());
+                tag2.setText(usr.getTag());
+                checkPublic.setChecked(usr.getPublic());
+                Glide.with(getContext()).load(usr.getAvatar()).into(imgavatar);
+                pg.dismiss();
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+
+}
+

+ 261 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/SettingsFragment.java

@@ -0,0 +1,261 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.graphics.drawable.ColorDrawable;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Switch;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.app.AppCompatDelegate;
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.UserApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.User;
+import com.google.gson.Gson;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * Created by Ouahab FENNICHE on 2020-02-03
+ */
+public class SettingsFragment extends Fragment {
+
+    private Button btnUpdatePassword, btnChangeColorAppli, btnYellow, btnPink, btnGreen, btnRed, btnBlue, btnGrey;
+    private Switch modeNight;
+
+    private Gson gson = new Gson();
+
+
+    private View popupInputDialogView = null;
+    private EditText oldPassword = null;
+    private EditText newPassword = null;
+
+    private Button saveNewPassword = null;
+    private Button applyChangeColor = null;
+    private Button cancelChangePassword = null;
+    private Button logout;
+
+    private ProgressDialog pg;
+
+
+    public static final String MyPREFERENCES = "nightModePrefs";
+    public static final String KEY_ISNIGHTMODE = "isNightMode";
+
+
+    public SettingsFragment() {
+    }
+
+    public static SettingsFragment newInstance() {
+        SettingsFragment fragment = new SettingsFragment();
+        return fragment;
+    }
+
+    @Nullable
+    @Override
+    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        if(Wishurgift.getSessionVariables().getUserConnected()==null || Wishurgift.getSessionVariables().getToken()==null){
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        View view = inflater.inflate(R.layout.settings_fragment, container, false);
+        btnUpdatePassword = view.findViewById(R.id.btnUpdatePassword);
+        btnUpdatePassword.setOnClickListener(v -> changePasswordPopup());
+        btnChangeColorAppli = view.findViewById(R.id.colorappli);
+        btnChangeColorAppli.setOnClickListener(v -> changeColorPopup());
+        modeNight = view.findViewById(R.id.switchMode);
+        modeNight.setOnCheckedChangeListener((buttonView, isChecked) -> {
+            if (isChecked) {
+                Toast.makeText(getContext(), "Mode night yes", Toast.LENGTH_SHORT).show();
+                AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
+
+            } else {
+                AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
+
+            }
+        });
+        logout = view.findViewById(R.id.logout);
+        logout.setOnClickListener(v -> logout());
+        return view;
+    }
+
+
+    private void logout() {
+        Wishurgift.getSessionVariables().setUserConnected(null);
+        Wishurgift.getSessionVariables().setToken(null);
+        getActivity().finish();
+        startActivity(new Intent(getActivity(), LoginActivity.class));
+    }
+
+
+
+    public void changePasswordPopup() {
+
+        AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("Change Password Dialog");
+        alertDialogBuilder.setIcon(R.drawable.ic_launcher_background);
+        alertDialogBuilder.setCancelable(false);
+        initPopupViewControls();
+        alertDialogBuilder.setView(popupInputDialogView);
+        final AlertDialog alertDialog = alertDialogBuilder.create();
+        alertDialog.show();
+
+        saveNewPassword.setOnClickListener(view -> {
+            saveChangePasswordAccount();
+            alertDialog.cancel();
+        });
+        cancelChangePassword.setOnClickListener(view -> alertDialog.cancel());
+    }
+
+    protected void onPreExecute() {
+        // pg = new ProgressDialog(getContext(),R.style.CustomDialog);
+        pg = new ProgressDialog(getContext());
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+
+    /**
+     * Update Only Password
+     */
+    private void saveChangePasswordAccount() {
+        onPreExecute();
+
+        UserApi.updateUser(null, null, newPassword.getText().toString(), false, response -> {
+            pg.dismiss();
+            afficherProfilInfo();
+        }, error -> onError2());
+
+    }
+
+    private void afficherProfilInfo() {
+        onPreExecute();
+        UserApi.getUserProfile(Wishurgift.getSessionVariables().getUserConnected().getId(), (Response.Listener<String>) response -> {
+            try {
+                JSONObject jsonObject = new JSONObject(response);
+                User usr = gson.fromJson(jsonObject.getJSONObject("data").toString(), User.class);
+                newPassword.setText(usr.getPassword());
+                pg.dismiss();
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+
+    }
+
+    /* Initialize popup dialog view and ui controls in the popup dialog. */
+    private void initPopupViewControls() {
+        LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
+        popupInputDialogView = layoutInflater.inflate(R.layout.popup_change_password_dialog, null);
+        oldPassword = popupInputDialogView.findViewById(R.id.oldpassword_popup);
+        newPassword = popupInputDialogView.findViewById(R.id.newpassword_popup);
+        saveNewPassword = popupInputDialogView.findViewById(R.id.button_save_new_password);
+        cancelChangePassword = popupInputDialogView.findViewById(R.id.button_cancel);
+
+    }
+
+
+    private void changeColorPopup() {
+        AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("Change Color Application Dialog");
+        alertDialogBuilder.setIcon(R.drawable.ic_launcher_background);
+        alertDialogBuilder.setCancelable(false);
+        initPopupViewControlsColors();
+        alertDialogBuilder.setView(popupInputDialogView);
+        final AlertDialog alertDialog = alertDialogBuilder.create();
+        alertDialog.show();
+        applyChangeColor.setOnClickListener(v -> alertDialog.cancel());
+
+
+    }
+
+    private void initPopupViewControlsColors() {
+
+        LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
+        popupInputDialogView = layoutInflater.inflate(R.layout.activity_colorful_actionbar, null);
+        btnRed = popupInputDialogView.findViewById(R.id.btnred);
+        btnRed.setOnClickListener(v -> {
+            ((AppCompatActivity) getActivity()).getSupportActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.colorRed)));
+
+        });
+
+        btnYellow = popupInputDialogView.findViewById(R.id.btnyellow);
+        btnYellow.setOnClickListener(v -> ((AppCompatActivity) getActivity()).getSupportActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.colorYellow))));
+
+        btnPink = popupInputDialogView.findViewById(R.id.btnpink);
+        btnPink.setOnClickListener(v -> ((AppCompatActivity) getActivity()).getSupportActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.colorPrimaryDark))));
+
+        btnGreen = popupInputDialogView.findViewById(R.id.btngreen);
+        btnGreen.setOnClickListener(v -> ((AppCompatActivity) getActivity()).getSupportActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.colorGreen))));
+
+        btnRed = popupInputDialogView.findViewById(R.id.btnred);
+        btnRed.setOnClickListener(v -> ((AppCompatActivity) getActivity()).getSupportActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.colorRed))));
+
+        btnGrey = popupInputDialogView.findViewById(R.id.btngrey);
+        btnGrey.setOnClickListener(v -> ((AppCompatActivity) getActivity()).getSupportActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.grey))));
+
+
+        btnBlue = popupInputDialogView.findViewById(R.id.btnblue);
+        btnBlue.setOnClickListener(v -> ((AppCompatActivity) getActivity()).getSupportActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.colorBlue))));
+
+        applyChangeColor = popupInputDialogView.findViewById(R.id.btnApplyChange);
+
+
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+
+    public void onError2(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("Unable to change your password").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}
+
+

+ 154 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/ShareListFragment.java

@@ -0,0 +1,154 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ListView;
+
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.adapter.ShareUserAdapter;
+import com.androiddev.project.ili.wishurgift.api.ContactsApi;
+import com.androiddev.project.ili.wishurgift.api.WishListApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.User;
+import com.google.gson.Gson;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * A simple {@link Fragment} subclass.
+ * Use the {@link ShareListFragment#newInstance} factory method to
+ * create an instance of this fragment.
+ */
+public class ShareListFragment extends Fragment {
+    private static final String ARG_PARAM1 = "param1";
+    List<User> contactList = new ArrayList<>();
+    ShareUserAdapter shareUserAdapter;
+    Gson gson = new Gson();
+    private int wishlistParentId;
+    private ProgressDialog pg;
+
+    public ShareListFragment() {
+        // Required empty public constructor
+    }
+
+    /**
+     * Use this factory method to create a new instance of
+     * this fragment using the provided parameters.
+     *
+     * @param wishListParentId Parameter 1.
+     * @return A new instance of fragment ShareListFragment.
+     */
+    // TODO: Rename and change types and number of parameters
+    public static ShareListFragment newInstance(int wishListParentId) {
+        ShareListFragment fragment = new ShareListFragment();
+        Bundle args = new Bundle();
+        args.putInt(ARG_PARAM1, wishListParentId);
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (getArguments() != null) {
+            wishlistParentId = getArguments().getInt(ARG_PARAM1);
+
+        }
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        if(Wishurgift.getSessionVariables().getUserConnected()==null || Wishurgift.getSessionVariables().getToken()==null){
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        View view = inflater.inflate(R.layout.fragment_share_list, container, false);
+        getListItems();
+        ListView listView = view.findViewById(R.id.userList);
+        shareUserAdapter = new ShareUserAdapter(getActivity(), contactList);
+        listView.setAdapter(shareUserAdapter);
+        listView.setOnItemClickListener((parent, view1, position, id) -> {
+            User selectedItem = (User) parent.getItemAtPosition(position);
+            partagerListe(selectedItem);
+        });
+
+        return view;
+    }
+
+    protected void onPreExecute() {
+        pg = new ProgressDialog(getContext());
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+
+
+    private void partagerListe(User selectedItem) {
+        WishListApi.shareWishList(wishlistParentId, selectedItem.getId(), response -> {
+            ((AppMainActivity) getActivity()).afficherContenuWishList(wishlistParentId, true);
+        }, error -> {
+            onError();
+        });
+    }
+
+    private void getListItems() {
+        ContactsApi.getContacts((Response.Listener<String>) response -> {
+            JSONObject jsonObject = null;
+            try {
+                jsonObject = new JSONObject(response);
+                JSONArray jsonArray = jsonObject.getJSONObject("data").getJSONArray("list");
+                updateListeContact(Arrays.asList(gson.fromJson(jsonArray.toString(), User[].class)));
+
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+    }
+
+
+    private void updateListeContact(List<User> newList) {
+        contactList.clear();
+        contactList.addAll(newList);
+        shareUserAdapter.notifyDataSetChanged();
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}

+ 167 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/ShowContactDetails.java

@@ -0,0 +1,167 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.api.ContactsApi;
+import com.androiddev.project.ili.wishurgift.api.StatsApi;
+import com.androiddev.project.ili.wishurgift.api.UserApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.ContactStats;
+import com.androiddev.project.ili.wishurgift.model.User;
+import com.bumptech.glide.Glide;
+import com.google.gson.Gson;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * Created by Ouahab FENNICHE on 26/04/2020
+ */
+public class ShowContactDetails extends Fragment {
+    private static final String ARG_PARAM1 = "param1";
+    private TextView name1, email, tag2, statsContact;
+    private CheckBox checkPublic;
+    private ImageView imgContact;
+    private Gson gson = new Gson();
+    private int contactParent;
+    private ProgressDialog pg;
+
+    public ShowContactDetails() {
+        // Required empty public constructor
+    }
+
+    public static ShowContactDetails newInstance(int param1) {
+        ShowContactDetails contactDetails = new ShowContactDetails();
+        Bundle args = new Bundle();
+        args.putInt(ARG_PARAM1, param1);
+        contactDetails.setArguments(args);
+        return contactDetails;
+
+    }
+
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (getArguments() != null) {
+            contactParent = getArguments().getInt(ARG_PARAM1);
+        }
+    }
+
+    @Nullable
+    @Override
+    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        if(Wishurgift.getSessionVariables().getUserConnected()==null || Wishurgift.getSessionVariables().getToken()==null){
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        View view = inflater.inflate(R.layout.fragment_detailscontact, container, false);
+        name1 = view.findViewById(R.id.profil_nameinf_contact);
+        email = view.findViewById(R.id.profil_email_contact);
+        tag2 = view.findViewById(R.id.profil_tag2_contact);
+        checkPublic = view.findViewById(R.id.profil_chkpublic_contact);
+        imgContact = view.findViewById(R.id.profile_image_contact);
+        afficherProfilContact();
+        ImageView returnToProfil = view.findViewById(R.id.retrunToListContacts);
+        returnToProfil.setOnClickListener(v -> ((AppMainActivity) getActivity()).afficherListesContacts());
+        Button deletecontact = view.findViewById(R.id.deleteContact);
+        deletecontact.setOnClickListener(v -> ContactsApi.deleteContact(contactParent, response -> {
+            Toast.makeText(getContext(), "contact deleted", Toast.LENGTH_SHORT).show();
+            ((AppMainActivity) getActivity()).afficherListesContacts();
+        }, error -> {
+            onError();
+        }));
+        statsContact = view.findViewById(R.id.contactStats);
+        afficherStatContact();
+
+        return view;
+    }
+
+    private void afficherStatContact() {
+        StatsApi.getStatsById(contactParent, (Response.Listener<String>) response -> {
+            try {
+                JSONObject jsonObject = new JSONObject(response);
+                ContactStats contactStats = gson.fromJson(jsonObject.getJSONObject("data").toString(), ContactStats.class);
+
+                statsContact.setText("number of Wishlist : " + contactStats.getNbWishlist() + "\n Number of elements : " + contactStats.getNbElement() +
+                        "\n Number of contacts : " + contactStats.getNbContact() + "\n idea : " + contactStats.getNbIdea() +
+                        " crush : " + contactStats.getNbCrush() + " , reserved : " + contactStats.getNbReserved() +
+                        "\n purchased : " + contactStats.getNbPurchased() + " , Average price : " + contactStats.getNbAveragePrice() +
+                        "\n Lowest price : " + contactStats.getNbLowestPrice() + " , Highest price : " + contactStats.getNbHighestPrice());
+
+                  } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+    }
+
+    protected void onPreExecute() {
+        pg = new ProgressDialog(getContext());
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+
+    private void afficherProfilContact() {
+        onPreExecute();
+        UserApi.getUserProfile(contactParent, (Response.Listener<String>) response -> {
+            try {
+                JSONObject jsonObject = new JSONObject(response);
+                User usr = gson.fromJson(jsonObject.getJSONObject("data").toString(), User.class);
+                name1.setText(usr.getUserName());
+                email.setText(usr.getEmail());
+                tag2.setText(usr.getTag());
+                checkPublic.setChecked(usr.getPublic());
+                Glide.with(getContext()).load(usr.getAvatar()).into(imgContact);
+
+                pg.dismiss();
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}
+

+ 191 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/WishListContentFragment.java

@@ -0,0 +1,191 @@
+package com.androiddev.project.ili.wishurgift.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import androidx.fragment.app.Fragment;
+
+import com.android.volley.Response;
+import com.androiddev.project.ili.wishurgift.R;
+import com.androiddev.project.ili.wishurgift.activities.AppMainActivity;
+import com.androiddev.project.ili.wishurgift.activities.LoginActivity;
+import com.androiddev.project.ili.wishurgift.adapter.ElementAdapter;
+import com.androiddev.project.ili.wishurgift.api.WishListApi;
+import com.androiddev.project.ili.wishurgift.application.Wishurgift;
+import com.androiddev.project.ili.wishurgift.model.Element;
+import com.androiddev.project.ili.wishurgift.model.WishListContent;
+import com.google.gson.Gson;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A simple {@link Fragment} subclass.
+ * Activities that contain this fragment must implement the
+ * {@link WishListContentFragment.OnFragmentInteractionListener} interface
+ * to handle interaction events.
+ * Use the {@link WishListContentFragment#newInstance} factory method to
+ * create an instance of this fragment.
+ */
+public class WishListContentFragment extends Fragment {
+    private static final String ARG_PARAM1 = "param1";
+    private static final String ARG_PARAM2 = "param2";
+    private ElementAdapter elementAdapter;
+    private List<Element> elements = new ArrayList<>();
+    private TextView addElement;
+    private TextView shareWishList;
+    Gson gson = new Gson();
+    private ProgressDialog pg;
+
+    // TODO: Rename and change types of parameters
+    private int idParent;
+    private boolean appartient;
+
+    public WishListContentFragment() {
+        // Required empty public constructor
+    }
+
+    /**
+     * Use this factory method to create a new instance of
+     * this fragment using the provided parameters.
+     *
+     * @param param1 Parameter 1.
+     * @return A new instance of fragment WishListContentFragment.
+     */
+    // TODO: Rename and change types and number of parameters
+    public static WishListContentFragment newInstance(int param1, boolean param2) {
+        WishListContentFragment fragment = new WishListContentFragment();
+        Bundle args = new Bundle();
+        args.putInt(ARG_PARAM1, param1);
+        args.putBoolean(ARG_PARAM2, param2);
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (getArguments() != null) {
+            idParent = getArguments().getInt(ARG_PARAM1);
+            appartient = getArguments().getBoolean(ARG_PARAM2);
+        }
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        if(Wishurgift.getSessionVariables().getUserConnected()==null || Wishurgift.getSessionVariables().getToken()==null){
+            getActivity().finish();
+            startActivity(new Intent(getActivity(), LoginActivity.class));
+        }
+        View view = inflater.inflate(R.layout.fragment_wish_list_content, container, false);
+        setVisibleAppartient(view);
+        ListView listView = view.findViewById(R.id.myListContent);
+        elementAdapter = new ElementAdapter(getActivity(), elements, appartient, idParent);
+        listView.setAdapter(elementAdapter);
+        afficherDonnees();
+        listView.setOnItemClickListener((parent, view1, position, id) -> {
+            Element selectedItem = (Element) parent.getItemAtPosition(position);
+            afficherDetail(selectedItem);
+        });
+
+        return view;
+    }
+
+    public void setVisibleAppartient(View view) {
+        if (appartient) {
+            addElement = view.findViewById(R.id.addElementButton);
+            addElement.setOnClickListener(v -> afficherAjouterWishlist());
+            addElement.setVisibility(View.VISIBLE);
+            shareWishList = view.findViewById(R.id.shareButton);
+            shareWishList.setOnClickListener(v -> afficherShareWishList());
+        }
+    }
+
+    protected void onPreExecute() {
+        pg = new ProgressDialog(getContext());
+        pg.setTitle("Processing...");
+        pg.setMessage("Please wait.");
+        pg.setCancelable(false);
+        pg.setIndeterminate(true);
+        pg.show();
+    }
+
+
+    public void afficherDonnees() {
+        WishListApi.getWishListById(idParent, (Response.Listener<String>) response -> {
+            try {
+                JSONObject jsonObject = new JSONObject(response);
+                JSONObject jsonData = jsonObject.getJSONObject("data");
+                afficherDonneesWishListContent(gson.fromJson(jsonData.toString(), WishListContent.class));
+
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }, error -> {
+            onError();
+        });
+    }
+
+    public void afficherDonneesWishListContent(WishListContent content) {
+        TextView name = getView().findViewById(R.id.wishlistName);
+        TextView stats = getView().findViewById(R.id.statsWishlistContent);
+        elements.clear();
+        elements.addAll(content.getElements());
+        Log.d("log", "" + elements.size());
+        name.setText(content.getName());
+        stats.setText("Total : " + content.getStats().getTotal() + " Unbuy : " + content.getStats().getUnbuy());
+        elementAdapter.notifyDataSetChanged();
+        if (content.getIs_public() && appartient) {
+            shareWishList.setVisibility(View.VISIBLE);
+        }
+        Log.d("log", "updated");
+    }
+
+    public void afficherAjouterWishlist() {
+        ((AppMainActivity) getActivity()).afficherAjouterElement(idParent);
+
+    }
+
+    public void afficherDetail(Element elt) {
+
+        ((AppMainActivity) getActivity()).afficherElement(idParent, elt.getId(), appartient);
+
+    }
+
+    private void afficherShareWishList() {
+
+        ((AppMainActivity) getActivity()).afficherShareList(idParent);
+
+    }
+
+    public void onError(){
+        AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(getContext());
+        alertDialogBuilder.setTitle("An error has occured");
+        alertDialogBuilder.setMessage("You will be redirected to the login page").setCancelable(false).setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.cancel();
+                Wishurgift.getSessionVariables().setUserConnected(null);
+                Wishurgift.getSessionVariables().setToken(null);
+                ((AppMainActivity)getActivity()).finish();
+                getActivity().startActivity(new Intent(getContext(), LoginActivity.class));
+            }
+        });
+        AlertDialog alertDialog =alertDialogBuilder.create();
+        alertDialog.show();
+    }
+}
+

+ 72 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/fragments/dummy/DummyContent.java

@@ -0,0 +1,72 @@
+package com.androiddev.project.ili.wishurgift.fragments.dummy;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Helper class for providing sample content for user interfaces created by
+ * Android template wizards.
+ * <p>
+ * TODO: Replace all uses of this class before publishing your app.
+ */
+public class DummyContent {
+
+    /**
+     * An array of sample (dummy) items.
+     */
+    public static final List<DummyItem> ITEMS = new ArrayList<DummyItem>();
+
+    /**
+     * A map of sample (dummy) items, by ID.
+     */
+    public static final Map<String, DummyItem> ITEM_MAP = new HashMap<String, DummyItem>();
+
+    private static final int COUNT = 25;
+
+    static {
+        // Add some sample items.
+        for (int i = 1; i <= COUNT; i++) {
+            addItem(createDummyItem(i));
+        }
+    }
+
+    private static void addItem(DummyItem item) {
+        ITEMS.add(item);
+        ITEM_MAP.put(item.id, item);
+    }
+
+    private static DummyItem createDummyItem(int position) {
+        return new DummyItem(String.valueOf(position), "Item " + position, makeDetails(position));
+    }
+
+    private static String makeDetails(int position) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("Details about Item: ").append(position);
+        for (int i = 0; i < position; i++) {
+            builder.append("\nMore details information here.");
+        }
+        return builder.toString();
+    }
+
+    /**
+     * A dummy item representing a piece of content.
+     */
+    public static class DummyItem {
+        public final String id;
+        public final String content;
+        public final String details;
+
+        public DummyItem(String id, String content, String details) {
+            this.id = id;
+            this.content = content;
+            this.details = details;
+        }
+
+        @Override
+        public String toString() {
+            return content;
+        }
+    }
+}

+ 47 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/Commentaire.java

@@ -0,0 +1,47 @@
+package com.androiddev.project.ili.wishurgift.model;
+
+public class Commentaire {
+    private int id;
+    private String text;
+    private String date;
+    private User user;
+
+    public Commentaire(int id, String text, String date, User user) {
+        this.id = id;
+        this.text = text;
+        this.date = date;
+        this.user = user;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+    public User getUser() {
+        return user;
+    }
+
+    public void setUser(User user) {
+        this.user = user;
+    }
+}

+ 133 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/ContactStats.java

@@ -0,0 +1,133 @@
+package com.androiddev.project.ili.wishurgift.model;
+
+import com.google.gson.annotations.SerializedName;
+
+/**
+ * Created by Ouahab FENNICHE on 28/04/2020
+ */
+public class ContactStats {
+    private int id;
+    @SerializedName("wishlist")
+    private int nbWishlist;
+    @SerializedName("element")
+    private int nbElement;
+    @SerializedName("contact")
+    private int nbContact;
+    @SerializedName("idea")
+    private int nbIdea;
+    @SerializedName("crush")
+    private int nbCrush;
+    @SerializedName("reserved")
+    private int nbReserved;
+    @SerializedName("purchased")
+    private int nbPurchased;
+    @SerializedName("averagePrice")
+    private double nbAveragePrice;
+    @SerializedName("lowestPrice")
+    private int nbLowestPrice;
+    @SerializedName("highestPrice")
+    private int nbHighestPrice;
+
+
+    public ContactStats(int id, int nbWishlist, int nbElement, int nbContact, int nbIdea, int nbCrush, int nbReserved, int nbPurchased, double nbAveragePrice, int nbLowestPrice, int nbHighestPrice) {
+        this.id = id;
+        this.nbWishlist = nbWishlist;
+        this.nbElement = nbElement;
+        this.nbContact = nbContact;
+        this.nbIdea = nbIdea;
+        this.nbCrush = nbCrush;
+        this.nbReserved = nbReserved;
+        this.nbPurchased = nbPurchased;
+        this.nbAveragePrice = nbAveragePrice;
+        this.nbLowestPrice = nbLowestPrice;
+        this.nbHighestPrice = nbHighestPrice;
+    }
+
+    public int getNbContact() {
+        return nbContact;
+    }
+
+    public void setNbContact(int nbContact) {
+        this.nbContact = nbContact;
+    }
+
+    public int getNbElement() {
+        return nbElement;
+    }
+
+    public void setNbElement(int nbElement) {
+        this.nbElement = nbElement;
+    }
+
+    public int getNbWishlist() {
+        return nbWishlist;
+    }
+
+    public void setNbWishlist(int nbWishlist) {
+        this.nbWishlist = nbWishlist;
+    }
+
+    public int getNbIdea() {
+        return nbIdea;
+    }
+
+    public void setNbIdea(int nbIdea) {
+        this.nbIdea = nbIdea;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public int getNbCrush() {
+        return nbCrush;
+    }
+
+    public void setNbCrush(int nbCrush) {
+        this.nbCrush = nbCrush;
+    }
+
+    public int getNbReserved() {
+        return nbReserved;
+    }
+
+    public void setNbReserved(int nbReserved) {
+        this.nbReserved = nbReserved;
+    }
+
+    public int getNbPurchased() {
+        return nbPurchased;
+    }
+
+    public void setNbPurchased(int nbPurchased) {
+        this.nbPurchased = nbPurchased;
+    }
+
+    public double getNbAveragePrice() {
+        return nbAveragePrice;
+    }
+
+    public void setNbAveragePrice(double nbAveragePrice) {
+        this.nbAveragePrice = nbAveragePrice;
+    }
+
+    public int getNbLowestPrice() {
+        return nbLowestPrice;
+    }
+
+    public void setNbLowestPrice(int nbLowestPrice) {
+        this.nbLowestPrice = nbLowestPrice;
+    }
+
+    public int getNbHighestPrice() {
+        return nbHighestPrice;
+    }
+
+    public void setNbHighestPrice(int nbHighestPrice) {
+        this.nbHighestPrice = nbHighestPrice;
+    }
+}

+ 89 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/Element.java

@@ -0,0 +1,89 @@
+package com.androiddev.project.ili.wishurgift.model;
+
+import java.util.List;
+
+public class Element {
+    private int id;
+    private String name;
+    private String status;
+    private String link;
+    private List<Image> image;
+    private String address;
+    private float price;
+    private String description;
+
+    public Element(int id, String name, String status, String link, List<Image> image, String address, float price, String description) {
+        this.id = id;
+        this.name=name;
+        this.status = status;
+        this.link = link;
+        this.image = image;
+        this.address = address;
+        this.price = price;
+        this.description = description;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getLink() {
+        return link;
+    }
+
+    public void setLink(String link) {
+        this.link = link;
+    }
+
+    public List<Image> getImage() {
+        return image;
+    }
+
+    public void setImage(List<Image> image) {
+        this.image = image;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public float getPrice() {
+        return price;
+    }
+
+    public void setPrice(float price) {
+        this.price = price;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+}

+ 41 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/Image.java

@@ -0,0 +1,41 @@
+package com.androiddev.project.ili.wishurgift.model;
+
+import com.google.gson.annotations.SerializedName;
+
+public class Image {
+    private int id;
+    @SerializedName("ext")
+    private String extension;
+    @SerializedName("data")
+    private String dataBase64;
+
+    public Image(int id, String extension, String dataBase64) {
+        this.id = id;
+        this.extension = extension;
+        this.dataBase64 = dataBase64;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getExtension() {
+        return extension;
+    }
+
+    public void setExtension(String extension) {
+        this.extension = extension;
+    }
+
+    public String getDataBase64() {
+        return dataBase64;
+    }
+
+    public void setDataBase64(String dataBase64) {
+        this.dataBase64 = dataBase64;
+    }
+}

+ 108 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/User.java

@@ -0,0 +1,108 @@
+package com.androiddev.project.ili.wishurgift.model;
+
+import com.google.gson.annotations.SerializedName;
+
+/**
+ * Created by Ouahab FENNICHE on 2020-01-25
+ */
+public class User {
+    private int id;
+    @SerializedName("name")
+    private String userName;
+    private String email ;
+    private String avatar;
+    @SerializedName("public")
+    private Boolean isPublic;
+    private String tag;
+    private transient String password;
+
+    @SerializedName("size")
+    private ContactStats stats;
+
+    public User(int id, String userName, String email, String avatar, Boolean isPublic, String tag, ContactStats stats) {
+        this.id = id;
+        this.userName = userName;
+        this.email = email;
+        this.avatar = avatar;
+        this.isPublic = isPublic;
+        this.tag = tag;
+        this.stats= stats;
+    }
+
+    public User() {
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
+    public Boolean getPublic() {
+        return isPublic;
+    }
+
+    public void setPublic(Boolean aPublic) {
+        isPublic = aPublic;
+    }
+
+    public String getTag() {
+        return tag;
+    }
+
+    public void setTag(String tag) {
+        this.tag = tag;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    @Override
+    public String toString() {
+        return "User{" +
+                "id=" + id +
+                ", userName='" + userName + '\'' +
+                ", tag='" + tag + '\'' +
+                ", email='" + email + '\'' +
+                '}';
+    }
+
+    public ContactStats getStats() {
+        return stats;
+    }
+
+    public void setStats(ContactStats stats) {
+        this.stats = stats;
+    }
+}

+ 61 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/WishList.java

@@ -0,0 +1,61 @@
+package com.androiddev.project.ili.wishurgift.model;
+
+import com.google.gson.annotations.SerializedName;
+
+public class WishList {
+    private int id;
+    private String name;
+    @SerializedName("public")
+    private Boolean isPublic;
+    private User user;
+    @SerializedName("size")
+    private WishStats stats;
+
+    public WishList(int id, String name, Boolean isPublic, WishStats stats, User user) {
+        this.id = id;
+        this.name = name;
+        this.isPublic = isPublic;
+        this.stats = stats;
+        this.user=user;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Boolean getPublic() {
+        return isPublic;
+    }
+
+    public void setPublic(Boolean aPublic) {
+        isPublic = aPublic;
+    }
+
+    public WishStats getStats() {
+        return stats;
+    }
+
+    public void setStats(WishStats stats) {
+        this.stats = stats;
+    }
+
+    public User getUser() {
+        return user;
+    }
+
+    public void setUser(User user) {
+        this.user = user;
+    }
+}

+ 64 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/WishListContent.java

@@ -0,0 +1,64 @@
+package com.androiddev.project.ili.wishurgift.model;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class WishListContent {
+    private int id;
+    private String name;
+    @SerializedName("public")
+    private Boolean is_public;
+    @SerializedName("size")
+    private WishStats stats;
+    @SerializedName("element")
+    private List<Element> elements;
+
+    public WishListContent(int id, String name, Boolean is_public, WishStats stats, List<Element> elements) {
+        this.id = id;
+        this.name=name;
+        this.is_public = is_public;
+        this.stats = stats;
+        this.elements = elements;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public Boolean getIs_public() {
+        return is_public;
+    }
+
+    public void setIs_public(Boolean is_public) {
+        this.is_public = is_public;
+    }
+
+    public WishStats getStats() {
+        return stats;
+    }
+
+    public void setStats(WishStats stats) {
+        this.stats = stats;
+    }
+
+    public List<Element> getElements() {
+        return elements;
+    }
+
+    public void setElements(List<Element> elements) {
+        this.elements = elements;
+    }
+}

+ 27 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/model/WishStats.java

@@ -0,0 +1,27 @@
+package com.androiddev.project.ili.wishurgift.model;
+
+public class WishStats {
+
+    private int total;
+    private int unbuy;
+    public WishStats(int total,int unbuy){
+        this.total=total;
+        this.unbuy=unbuy;
+    }
+
+    public int getTotal() {
+        return total;
+    }
+
+    public void setTotal(int total) {
+        this.total = total;
+    }
+
+    public int getUnbuy() {
+        return unbuy;
+    }
+
+    public void setUnbuy(int unbuy) {
+        this.unbuy = unbuy;
+    }
+}

+ 91 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/util/Constants.java

@@ -0,0 +1,91 @@
+package com.androiddev.project.ili.wishurgift.util;
+
+/**
+ * Created by Ouahab FENNICHE on 2020-01-25
+ */
+
+
+public class Constants {
+    public static final int DB_VERSION = 1;
+    public static final String DB_NAME = "register.db";
+    public static final String TABLE_NAME = "registerUser";
+
+
+    //Table Columns
+    public static final String KEY_ID = "id";
+    public static final String KEY_USERNAME = "userName";
+    public static final String KEY_PASSWORD = "password";
+    public static final String KEY_EMAIL = "email";
+
+    //API
+    public static final String API_URL = "http://wishurgift.loquico.me/";
+
+    //Users
+    //GET
+    public static final String USER_LIST_WISHLIST = "users/%d/wishlists";
+    public static final String USER_PROFILE = "users/%d";
+    public static final String USER_SEARCH_WITH_LIMIT = "users/search/%s/%d";
+    public static final String USER_LIST_WISHLIST_PAGINABLE = "users/%d/wishlists/page/%d/%d";
+    public static final String USER_SHARED_LIST = "users/wishlists/shared";
+    public static final String USER_SHARED_LIST_PAGINABLE = "users/%d/shared/page/%d/%d";
+    //POST
+    public static final String LOGIN = "users/login";
+    public static final String SIGN_IN = "users";
+    //PUT
+    public static final String REFRESH_TOKEN = "users/refresh";
+    public static final String UPDATE_USER = "users";
+
+    //Wishlist
+    //GET
+    public static final String WISHLIST = "wishlists/%d";
+    //POST
+    public static final String ADD_WISHLIST = "wishlists";
+    public static final String ADD_ITEM_WISHLIST = "wishlists/%d/element";
+    //PUT
+    public static final String UPDATE_WISHLIST = "wishlists/%d";
+    public static final String SHARE_WISHLIST = "wishlists/%d/share/%d";
+    //DELETE
+    public static final String DELETE_WISHLIST = "wishlists/%d";
+    public static final String UNDOSHARE_WISHLIST = "wishlists/%d/share/%d";
+
+    //Elements
+    //GET
+    public static final String ELEMENT = "elements/%d";
+    public static final String ELEMENT_COMMENTS = "elements/%d/comments";
+    public static final String ELEMENT_COMMENTS_PAGINABLE = "elements/%d/comments/page/%d/%d";
+    //POST
+    public static final String ADD_IMG = "elements/%d/image";
+    public static final String ADD_COMMENT = "elements/%d/comment";
+    //PUT
+    public static final String UPDATE_ELEMENT = "elements/%d";
+    public static final String UPDATE_STATUS = "elements/%d/status/%s";
+    //DELETE
+    public static final String DELETE_ELEMENT = "elements/%d";
+
+    //Contacts
+    //GET
+    public static final String CONTACT_LIST = "/contacts";
+    public static final String CONTACT_LIST_PAGINABLE = "/contacts/page/%d/%d";
+    public static final String CONTACTS_PENDING = "/contacts/pending";
+    public static final String CONTACTS_PENDING_PAGINABLE = "/contacts/pending/page/%d/%d";
+    public static final String CONTACTS_REQUESTED = "contacts/request";
+    public static final String CONTACTS_REQUESTED_PAGINABLE = "/contacts/request/page/%d/%d";
+    //POST
+    public static final String ADD_CONTACT = "contacts";
+    //DELETE
+    public static final String DELETE_CONTACTS = "contacts/%d";
+
+    // Commentaire
+    //GET
+    public static final String COMMENT = "comments/%d";
+    //PUT
+    public static final String UPDATE_COMMENT = "comments/%d";
+    //DELETE
+    public static final String DELETE_COMMENT = "comments/%d";
+
+
+    // Stat
+    //GET
+    public static final String STATS = "stats/user/%d";
+
+}

+ 27 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/util/NonScrollListView.java

@@ -0,0 +1,27 @@
+package com.androiddev.project.ili.wishurgift.util;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.ViewGroup;
+import android.widget.ListView;
+
+public class NonScrollListView extends ListView {
+
+    public NonScrollListView(Context context) {
+        super(context);
+    }
+    public NonScrollListView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+    public NonScrollListView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+    @Override
+    public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        int heightMeasureSpec_custom = MeasureSpec.makeMeasureSpec(
+                Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
+        super.onMeasure(widthMeasureSpec, heightMeasureSpec_custom);
+        ViewGroup.LayoutParams params = getLayoutParams();
+        params.height = getMeasuredHeight();
+    }
+}

+ 26 - 0
android/app/src/main/java/com/androiddev/project/ili/wishurgift/util/SessionVariables.java

@@ -0,0 +1,26 @@
+package com.androiddev.project.ili.wishurgift.util;
+
+import com.androiddev.project.ili.wishurgift.model.User;
+
+public class SessionVariables {
+    // @Todo sauvegarder ici l'utilisateur de la session
+    private User userConnected = new User(1, "toto", "mail@mail.mail", "avatar", true, "toto#1234", null);
+
+    private String token;
+
+    public User getUserConnected() {
+        return userConnected;
+    }
+
+    public void setUserConnected(User userConnected) {
+        this.userConnected = userConnected;
+    }
+
+    public String getToken() {
+        return token;
+    }
+
+    public void setToken(String token) {
+        this.token = token;
+    }
+}

+ 18 - 0
android/app/src/main/res/anim/bottom_animantion.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <translate
+        android:duration="1500"
+        android:fromXDelta="0%"
+        android:fromYDelta="100%">
+
+    </translate>
+
+    <alpha
+        android:duration="1500"
+        android:fromAlpha="0.1"
+        android:toAlpha="1.0">
+
+    </alpha>
+
+</set>

+ 16 - 0
android/app/src/main/res/anim/middle_animantion.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <translate
+        android:duration="1500"
+        android:fromXDelta="-200%"
+        android:fromYDelta="0%">
+
+    </translate>
+
+    <alpha
+        android:duration="1500"
+        android:fromAlpha="0.1"
+        android:toAlpha="1.0">
+
+    </alpha>
+</set>

+ 4 - 0
android/app/src/main/res/anim/slide_in_left.xml

@@ -0,0 +1,4 @@
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <translate android:fromXDelta="-100%p" android:toXDelta="0"
+        android:duration="@android:integer/config_mediumAnimTime"/>
+</set>

+ 4 - 0
android/app/src/main/res/anim/slide_in_right.xml

@@ -0,0 +1,4 @@
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <translate android:fromXDelta="100%p" android:toXDelta="0"
+        android:duration="@android:integer/config_mediumAnimTime"/>
+</set>

+ 5 - 0
android/app/src/main/res/anim/stay.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+    android:duration="@android:integer/config_longAnimTime"
+    android:fromYDelta="0%p"
+    android:toYDelta="0%p" />

+ 18 - 0
android/app/src/main/res/anim/top_animantion.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <translate
+        android:duration="1500"
+        android:fromXDelta="0%"
+        android:fromYDelta="-500%">
+
+    </translate>
+
+    <alpha
+        android:duration="1500"
+        android:fromAlpha="0.1"
+        android:toAlpha="1.0">
+
+    </alpha>
+
+</set>

+ 17 - 0
android/app/src/main/res/drawable-v24/button_background_blue.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
+    <corners
+        android:radius="26dp" />
+
+    <solid
+        android:color="#00ADC1"/>
+
+    <padding
+        android:left="10dp"
+        android:top="0dp"
+        android:right="0dp"
+        android:bottom="0dp" />
+    <size
+        android:width="182dp"
+        android:height="40dp" />
+</shape>

BIN
android/app/src/main/res/drawable-v24/ic_address.png


BIN
android/app/src/main/res/drawable-v24/ic_dob.png


BIN
android/app/src/main/res/drawable-v24/ic_email.png


File diff suppressed because it is too large
+ 3 - 0
android/app/src/main/res/drawable-v24/ic_fingerprint_white_24dp.xml


BIN
android/app/src/main/res/drawable-v24/ic_mobile.png


BIN
android/app/src/main/res/drawable-v24/ic_name.png


+ 10 - 0
android/app/src/main/res/drawable-v24/profile_bk.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
+    <gradient
+        android:angle="0"
+        android:centerX="35%"
+        android:startColor="#FF3B30"
+        android:endColor="#FF9301"
+        android:type="linear"
+        />
+</shape>

+ 12 - 0
android/app/src/main/res/drawable/bg.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape>
+            <gradient
+                android:angle="90"
+                android:startColor="#F9696F"
+                android:endColor="#FE5295"
+                android:type="linear" />
+        </shape>
+    </item>
+</selector>

+ 9 - 0
android/app/src/main/res/drawable/boarder.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <stroke
+        android:width="2dp"
+        android:color="@color/grey" />
+
+    <corners android:radius="12dp" />
+</shape>

+ 28 - 0
android/app/src/main/res/drawable/button.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
+    <corners
+        android:radius="14dp"
+        />
+    <gradient
+        android:angle="45"
+        android:centerX="35%"
+        android:centerColor="#47A891"
+        android:startColor="#E8E8E8"
+        android:endColor="#000000"
+        android:type="linear"
+        />
+    <padding
+        android:left="0dp"
+        android:top="0dp"
+        android:right="0dp"
+        android:bottom="0dp"
+        />
+    <size
+        android:width="270dp"
+        android:height="60dp"
+        />
+    <stroke
+        android:width="3dp"
+        android:color="#878787"
+        />
+</shape>

BIN
android/app/src/main/res/drawable/cad.png


+ 8 - 0
android/app/src/main/res/drawable/edit_text_background.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <stroke
+        android:color="@android:color/holo_orange_dark"
+        android:width="1dp"/>
+</shape>

+ 11 - 0
android/app/src/main/res/drawable/edit_text_bottom.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape>
+            <corners android:bottomLeftRadius="5dp"
+                android:bottomRightRadius="5dp"/>
+            <solid android:color="#F2F2F2" />
+            <stroke android:width="0.2dp" android:color="#BEBDBD" />
+        </shape>
+    </item>
+</layer-list>

+ 10 - 0
android/app/src/main/res/drawable/edit_text_middle.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape>
+            <corners android:radius="0dp"/>
+            <solid android:color="#F2F2F2" />
+            <stroke android:width="0.2dp" android:color="#BEBDBD" />
+        </shape>
+    </item>
+</layer-list>

+ 11 - 0
android/app/src/main/res/drawable/edit_text_top.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+<item>
+    <shape>
+        <corners android:topLeftRadius="5dp"
+            android:topRightRadius="5dp"/>
+        <solid android:color="#F2F2F2" />
+        <stroke android:width="0.2dp" android:color="#BEBDBD" />
+    </shape>
+</item>
+</layer-list>

+ 9 - 0
android/app/src/main/res/drawable/ic_about.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
+</vector>

+ 5 - 0
android/app/src/main/res/drawable/ic_add_box_black_24dp.xml

@@ -0,0 +1,5 @@
+<vector android:height="48dp" android:tint="#110DFF"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M19,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM17,13h-4v4h-2v-4L7,13v-2h4L11,7h2v4h4v2z"/>
+</vector>

+ 12 - 0
android/app/src/main/res/drawable/ic_add_img.xml

@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="40dp"
+        android:height="126dp"
+        android:viewportWidth="40.292"
+        android:viewportHeight="126.85">
+    <path
+        android:pathData="M40.29,-0l-0.09,126.85a14.73,14.73 63.47,0 0,-5.87 -11.41c-15.61,-8.98 -34.88,-31.26 -34.32,-53.3 0.6,-23.46 22.29,-39.97 34.32,-51.53A22.57,22.57 95.8,0 0,40.29 -0Z"
+        android:fillColor="#11cfc5"/>
+    <path
+        android:pathData="M32.36,61.09L24.85,61.09L24.85,53.57A1.35,1.35 0,0 0,23.45 52.48,1.35 1.35,0 0,0 22.05,53.57L22.05,61.09L14.53,61.09A1.35,1.35 0,0 0,13.45 62.48a1.35,1.35 0,0 0,1.09 1.4L22.05,63.88v7.52A1.35,1.35 0,0 0,23.45 72.48a1.35,1.35 0,0 0,1.4 -1.09L24.85,63.88h7.52A1.35,1.35 0,0 0,33.45 62.48,1.35 1.35,0 0,0 32.36,61.09Z"
+        android:fillColor="#fcfcfc"/>
+</vector>

+ 12 - 0
android/app/src/main/res/drawable/ic_back_img.xml

@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="35dp"
+        android:height="110dp"
+        android:viewportWidth="35.022"
+        android:viewportHeight="110.257">
+    <path
+        android:pathData="M-0,-0l0.08,110.26a12.8,12.8 93.91,0 1,5.1 -9.92c13.56,-7.81 30.32,-27.17 29.83,-46.33 -0.52,-20.39 -19.37,-34.74 -29.83,-44.79A19.61,19.61 60.14,0 1,-0 -0Z"
+        android:fillColor="#fcfcfc"/>
+    <path
+        android:pathData="M25.47,54.19L13.27,54.19l5.6,-5.6L17.47,47.19 9.47,55.19l8,8 1.4,-1.4L13.27,56.19L25.47,56.19Z"
+        android:fillColor="#11cfc5"/>
+</vector>

+ 9 - 0
android/app/src/main/res/drawable/ic_contact.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M21,8L21,7l-3,2 -3,-2v1l3,2 3,-2zM22,3L2,3C0.9,3 0,3.9 0,5v14c0,1.1 0.9,2 2,2h20c1.1,0 1.99,-0.9 1.99,-2L24,5c0,-1.1 -0.9,-2 -2,-2zM8,6c1.66,0 3,1.34 3,3s-1.34,3 -3,3 -3,-1.34 -3,-3 1.34,-3 3,-3zM14,18L2,18v-1c0,-2 4,-3.1 6,-3.1s6,1.1 6,3.1v1zM22,12h-8L14,6h8v6z"/>
+</vector>

+ 12 - 0
android/app/src/main/res/drawable/ic_dark_mode.xml

@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="36dp"
+        android:height="36dp"
+        android:viewportWidth="36.0"
+        android:viewportHeight="36.0">
+    <path
+        android:pathData="M18,18m-18,0a18,18 0,1 1,36 0a18,18 0,1 1,-36 0"
+        android:fillColor="#464646"/>
+    <path
+        android:pathData="M18.63,28.56a10.5,10.5 0,0 0,9.63 -6.07,8.23 8.23,0 0,1 -3.47,0.69A8.48,8.48 0,0 1,16.32 14.7,8.78 8.78,0 0,1 20.89,7.13 16.1,16.1 0,0 0,18.63 7a10.78,10.78 0,0 0,0 21.56ZM18.63,28.56"
+        android:fillColor="#fff"/>
+</vector>

+ 9 - 0
android/app/src/main/res/drawable/ic_dashboard.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M3,13h8L11,3L3,3v10zM3,21h8v-6L3,15v6zM13,21h8L21,11h-8v10zM13,3v6h8L21,3h-8z"/>
+</vector>

+ 5 - 0
android/app/src/main/res/drawable/ic_delete_forever_black_24dp.xml

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:tint="#E83124"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"/>
+</vector>

+ 9 - 0
android/app/src/main/res/drawable/ic_edit_black_24dp.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
+</vector>

Some files were not shown because too many files changed in this diff