Skip to content
Extraits de code Groupes Projets
Valider 69ca96b4 rédigé par Arthur Schamroth's avatar Arthur Schamroth
Parcourir les fichiers

Merge branch 'arthur' into 'main'

Correct image in modification ex popup

See merge request !29
parents 5facaf80 51e1e7be
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!29Correct image in modification ex popup
......@@ -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);
}
}
......
......@@ -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"
......
......@@ -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"
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter