diff --git a/app/src/main/java/be/lepl1509group13/workoutwarrior/ProgramCreationActivity.java b/app/src/main/java/be/lepl1509group13/workoutwarrior/ProgramCreationActivity.java index 2fe06bf7f12f9be79ecc6c552e5daad078a84088..cac6ea9931410f9bc3cde055fe8ecb8704737aef 100644 --- a/app/src/main/java/be/lepl1509group13/workoutwarrior/ProgramCreationActivity.java +++ b/app/src/main/java/be/lepl1509group13/workoutwarrior/ProgramCreationActivity.java @@ -68,6 +68,7 @@ public class ProgramCreationActivity extends AppCompatActivity { AutoCompleteTextView input_exo; // Champ de texte pour rechercher les exercices // Liste d'exos dynamique à remplir depuis la DB public Exercise actual_exo ; + public String img_actual_exo; private static ArrayList<String> EXOS = new ArrayList<>(); // Liste des exercices de la base de données CheckBox cb_lundi, cb_mardi, cb_mercredi, cb_jeudi, cb_vendredi, cb_samedi, cb_dimanche; private ArrayList<CheckBox> cb_list = new ArrayList<>(); @@ -228,7 +229,7 @@ public class ProgramCreationActivity extends AppCompatActivity { public void onDataChange(DataSnapshot dataSnapshot) { for (DataSnapshot snapshot : dataSnapshot.getChildren()) { Long timer = (snapshot.child("timer").getValue(Long.class))/1000; - String image_url = snapshot.child("image_url").getValue(String.class); + img_actual_exo = snapshot.child("image_url").getValue(String.class); Long break_time = (snapshot.child("break").getValue(Long.class))/1000; String description = snapshot.child("description").getValue(String.class); @@ -250,9 +251,9 @@ public class ProgramCreationActivity extends AppCompatActivity { if(break_time != null){ break_text.setText(break_time.toString()); } - /**int resId = getResources().getIdentifier(image_url, "drawable", getPackageName()); - ImageView image = findViewById(R.id.exercice_to_modify_image); - image.setImageResource(resId);**/ + int resId = getResources().getIdentifier(img_actual_exo, "drawable", getPackageName()); + ImageView image = dialog.findViewById(R.id.exercice_to_modify_image); + image.setImageResource(resId); } } diff --git a/app/src/main/res/layout/help_creation_program_popup.xml b/app/src/main/res/layout/help_creation_program_popup.xml index 89862e66641f976410b8904d78c915a11e4dfdec..da6db25c32850f1cec3b9218adceb8f844a2b7b2 100644 --- a/app/src/main/res/layout/help_creation_program_popup.xml +++ b/app/src/main/res/layout/help_creation_program_popup.xml @@ -50,7 +50,7 @@ android:id="@+id/explication_text1" android:layout_width="350dp" android:layout_height="match_parent" - android:text="• Pour commencer, sélectionnez le(s) jour(s) au(x)quel(s) vous voulez ajouter un ou plusieurs exercices." + android:text="• Pour commencer, sélectionnez l'exercice que vous voulez ajouter à votre programme et cliquez sur 'ajouter un exercice'" android:textSize="16dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> @@ -60,7 +60,7 @@ android:layout_width="357dp" android:layout_height="65dp" android:layout_marginTop="15dp" - android:text="• Sélectionnez l'exercice que vous voulez ajouter pour ce(s) jour(s) dans la liste déroulante et cliquez sur le bouton ajouter exercice." + android:text="• Choisissez ensuite les jours auxquels vous voulez ajouter cet exercice." android:textSize="16dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -72,7 +72,7 @@ android:layout_width="350dp" android:layout_height="match_parent" android:layout_marginTop="15dp" - android:text="• Cliquez sur un jour pour voir le(s) exercice(s) enregistré(s) pour ce dernier." + android:text="• Personnalisez votre exercice en modifiant sa description, en ajustant son temps de pause ou sa durée totale." android:textSize="16dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -83,7 +83,7 @@ android:layout_width="350dp" android:layout_height="match_parent" android:layout_marginTop="15dp" - android:text="• Cliquez sur le bouton Enregistrer pour sauvegarder votre nouveau programme." + android:text="• Cliquez ensuite sur enregistrer pour sauver votre exercice personnalisé." android:textSize="16dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layout/modify_exercice_popup.xml b/app/src/main/res/layout/modify_exercice_popup.xml index 1e0cdfee773d74e341a6a1919df073f8d5b8d658..fdb200a10dc5081bb8035d0c989560873f5c742c 100644 --- a/app/src/main/res/layout/modify_exercice_popup.xml +++ b/app/src/main/res/layout/modify_exercice_popup.xml @@ -16,8 +16,8 @@ <TextView android:id="@+id/exercice_to_modify_name" - android:layout_width="wrap_content" - android:layout_height="40dp" + android:layout_width="200dp" + android:layout_height="wrap_content" android:fontFamily="@font/poppins_semibold" android:gravity="center" android:textSize="20sp" @@ -28,8 +28,8 @@ <ImageView android:id="@+id/exercice_to_modify_image" - android:layout_width="120dp" - android:layout_height="120dp" + android:layout_width="110dp" + android:layout_height="110dp" android:layout_marginLeft="25dp" android:src="@drawable/developpe_couche_barre" app:layout_constraintBottom_toBottomOf="parent"