From c0c070b95def4e5d43601d554ce365a9769a1358 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Ckamon?= <“kamon.sourabie@imt-atlantique.net”>
Date: Sun, 15 Dec 2024 18:44:06 +0100
Subject: [PATCH] Apparition du formulaire uniquement lors du chargement d'une
 photo via la gallerie

---
 app/src/main/java/com/example/myapplication/PhotoPage.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/src/main/java/com/example/myapplication/PhotoPage.java b/app/src/main/java/com/example/myapplication/PhotoPage.java
index 6da89f8..6db9197 100644
--- a/app/src/main/java/com/example/myapplication/PhotoPage.java
+++ b/app/src/main/java/com/example/myapplication/PhotoPage.java
@@ -110,6 +110,7 @@ public class PhotoPage extends Fragment {
                 if (cameraImage != null) {
                     imageView.setImageBitmap(cameraImage);
                     processImage(cameraImage); // Pass the image for further processing
+                    showOverlayForm();
                 }
                 break;
 
@@ -130,7 +131,7 @@ public class PhotoPage extends Fragment {
                 }
                 break;
         }
-        showOverlayForm();
+
     }
 
     private void processImage(Bitmap bitmap) {
@@ -155,7 +156,7 @@ public class PhotoPage extends Fragment {
         } catch (IOException e) {
             throw new RuntimeException(e);
         } catch (NoSpeciesRecognizedException e) {
-            textPredictionOutput.setText("Cette espèce pas encore répertoriée");
+            textPredictionOutput.setText("Cette espèce n'est pas encore répertoriée.");
         }
     }
 
-- 
GitLab