Skip to content
Extraits de code Groupes Projets

Comparer les révisions

Les modifications sont affichées comme si la révision source était fusionnée avec la révision cible. En savoir plus sur la comparaison des révisions.

Source

Sélectionner le projet cible
No results found

Cible

Sélectionner le projet cible
  • schamrotha/LEPL1509-Projet
1 résultat
Afficher les modifications
Validations sur la source (4)
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
}
android {
......@@ -44,4 +45,8 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation platform('com.google.firebase:firebase-bom:31.2.3')
implementation 'com.google.firebase:firebase-auth'
}
\ No newline at end of file
implementation 'com.google.firebase:firebase-crashlytics:18.2.9'
implementation 'com.google.firebase:firebase-analytics:20.1.2'
implementation 'com.google.code.gson:gson:2.8.9'
}
package be.lepl1509group13.workoutwarrior;
import android.annotation.SuppressLint;
import android.content.Context;
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.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.material.navigation.NavigationView;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.google.gson.Gson;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
......@@ -41,6 +52,7 @@ public class MainActivity extends AppCompatActivity implements MainAdapter.OnIte
private final FirebaseDatabase firebaseDb = FirebaseDatabase.getInstance();
private DatabaseReference db;
private FirebaseAuth mAuth;
private Integer numberOfProgramsToDisplay = 0, totalNumberOfCustomPrograms = 0;
private boolean needsRefresh = false;
......@@ -51,6 +63,9 @@ public class MainActivity extends AppCompatActivity implements MainAdapter.OnIte
setContentView(R.layout.activity_main);
getSupportActionBar().hide();
mAuth = FirebaseAuth.getInstance();
FirebaseUser currentUser = mAuth.getCurrentUser();
db = firebaseDb.getReference("Programs");
getProgramData();
......@@ -74,6 +89,9 @@ public class MainActivity extends AppCompatActivity implements MainAdapter.OnIte
drawerLayout.closeDrawer(GravityCompat.START);
return false;
});
//check if any programs were shared by friends
getUserPseudo(currentUser);
}
@Override
......@@ -241,4 +259,176 @@ public class MainActivity extends AppCompatActivity implements MainAdapter.OnIte
});
}
private void getSharedPrograms(String currentUser) {
db = firebaseDb.getReference("Shared_program");
db.addValueEventListener(new ValueEventListener() {
@SuppressLint("SetTextI18n")
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
DataSnapshot firstChild = dataSnapshot.child(currentUser);
for (DataSnapshot childData: firstChild.getChildren()) {
for(DataSnapshot realData : firstChild.child(childData.getKey()).getChildren()){
//aled
String dataFromDB = realData.getValue(String.class);
Gson gson = new Gson();
HashMap<String, ArrayList<Exercise>> programByDay = gson.fromJson(dataFromDB, HashMap.class);
androidx.appcompat.app.AlertDialog.Builder builder = new androidx.appcompat.app.AlertDialog.Builder(MainActivity.this);
LayoutInflater inflater = getLayoutInflater();
View dialogView = inflater.inflate(R.layout.shared_workout_popup, null);
TextView title = dialogView.findViewById(R.id.share_popup_title);
title.setText(childData.getKey() + " a partagé avec vous son programme personnel.");
TextView description = dialogView.findViewById(R.id.share_popup_description);
description.setText("Voulez-vous l'accepter ?");
builder.setView(dialogView);
builder.setPositiveButton("J'accepte", (dialog, which) ->
addNewCustomWorkout(childData.getKey(), programByDay));
builder.setNegativeButton("Je refuse", (dialog, which) ->
Log.d("MainActivity", "Cancel workout share with: " + childData.getKey()));
AlertDialog dialog = builder.create();
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface dialog) {
Button positiveButton = ((AlertDialog) dialog).getButton(DialogInterface.BUTTON_POSITIVE);
positiveButton.setTextColor(getResources().getColor(R.color.green));
Button negativeButton = ((AlertDialog) dialog).getButton(DialogInterface.BUTTON_NEGATIVE);
negativeButton.setTextColor(getResources().getColor(R.color.black));
}
});
dialog.show();
}
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
Toast.makeText(MainActivity.this, "Une erreur est survenue !", Toast.LENGTH_SHORT).show();
}
});
}
private void getUserPseudo(FirebaseUser currentUser) {
if(currentUser != null){
db = firebaseDb.getReference("Account_pseudo");
db.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
for (DataSnapshot childSnapshot: dataSnapshot.getChildren()) {
String userKey = childSnapshot.getKey();
String pseudo = childSnapshot.getValue(String.class);
if(Objects.equals(userKey, currentUser.getUid())){
db = firebaseDb.getReference("Friends");
getSharedPrograms(pseudo);
return;
}
}
}
@Override
public void onCancelled(@NonNull DatabaseError error) {
Toast.makeText(MainActivity.this, "Une erreur est survenue !", Toast.LENGTH_SHORT).show();
}
});
}
}
private void addNewCustomWorkout(String username, HashMap<String, ArrayList<Exercise>> programByDay) {
/*
Log.d("NOP", "user: " + username);
Log.d("NOP", "data: " + programByDay);
Log.d("TAG", "addNewCustomWorkout: " + programByDay.get("lundi"));
String lundiString = null, lundiSubstring, mardiString = null, mardiSubstring, mercrediString = null, mercrediSubstring, jeudiString = null, jeudiSubstring,
vendrediString = null, vendrediSubstring, samediString = null, samediSubstring, dimancheString = null, dimancheSubstring;
ArrayList<Exercise> lundi = programByDay.get("lundi");
if(!lundi.isEmpty()){
lundiSubstring = lundi.toString().substring(lundi.toString().indexOf("name=") + 5, lundi.toString().indexOf(", timer"));
lundiString = lundiSubstring.trim().replaceAll("^\"|\"$", "");
}
ArrayList<Exercise> mardi = programByDay.get("mardi");
if(!mardi.isEmpty()){
mardiSubstring = mardi.toString().substring(mardi.toString().indexOf("name=") + 5, mardi.toString().indexOf(", timer"));
mardiString = mardiSubstring.trim().replaceAll("^\"|\"$", "");
}
ArrayList<Exercise> mercredi = programByDay.get("mercredi");
if(!mercredi.isEmpty()){
mercrediSubstring = mercredi.toString().substring(mercredi.toString().indexOf("name=") + 5, mercredi.toString().indexOf(", timer"));
mercrediString = mercrediSubstring.trim().replaceAll("^\"|\"$", "");
}
ArrayList<Exercise> jeudi = programByDay.get("jeudi");
if(!jeudi.isEmpty()){
jeudiSubstring = jeudi.toString().substring(jeudi.toString().indexOf("name=") + 5, jeudi.toString().indexOf(", timer"));
jeudiString = jeudiSubstring.trim().replaceAll("^\"|\"$", "");
}
ArrayList<Exercise> vendredi = programByDay.get("vendredi");
if(!vendredi.isEmpty()){
vendrediSubstring = vendredi.toString().substring(vendredi.toString().indexOf("name=") + 5, vendredi.toString().indexOf(", timer"));
vendrediString = vendrediSubstring.trim().replaceAll("^\"|\"$", "");
}
ArrayList<Exercise> samedi = programByDay.get("samedi");
if(!samedi.isEmpty()){
samediSubstring = samedi.toString().substring(samedi.toString().indexOf("name=") + 5, samedi.toString().indexOf(", timer"));
samediString = samediSubstring.trim().replaceAll("^\"|\"$", "");
}
ArrayList<Exercise> dimanche = programByDay.get("dimanche");
if(dimanche.isEmpty()){
dimancheSubstring = dimanche.toString().substring(dimanche.toString().indexOf("name=") + 5, dimanche.toString().indexOf(", timer"));
dimancheString = dimancheSubstring.trim().replaceAll("^\"|\"$", "");
}
//String inputString = "[{breakVal=60.0, description=Répétitions : 4x10, image_url=@drawable/developpe_couche_barre, name=Développé couché, timer=0.0, workingDays=[]}]";
System.out.println(lundiString); // Output: Développé couché
System.out.println(mardiString); // Output: Développé couché
System.out.println(mercrediString); // Output: Développé couché
System.out.println(jeudiString); // Output: Développé couché
System.out.println(vendrediString); // Output: Développé couché
System.out.println(samediString); // Output: Développé couché
System.out.println(dimancheString); // Output: Développé couché
ArrayList<Exercise> newLundi = new ArrayList<>();
newLundi.add(new Exercise(lundiString, "fff", 10, "ah oue", 10));
programByDay.clear();
programByDay.put("lundi", newLundi);
try {
String programpath = username + ".ser";
HashMap<String, ArrayList<Exercise>> entry = programByDay;
ExerciseEntry exerciseEntry = new ExerciseEntry(entry);
FileOutputStream fileOutputStream = openFileOutput(programpath, Context.MODE_PRIVATE);
ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);
objectOutputStream.writeObject(exerciseEntry);
objectOutputStream.close();
fileOutputStream.close();
//todo
//Tell the mainActivity to refresh, to add the new program
//setResult(1);
Toast.makeText(MainActivity.this, "Programme enregistré !",
Toast.LENGTH_SHORT).show();
} catch (Exception e) {
e.printStackTrace();
}
*/
}
}
\ No newline at end of file
......@@ -19,6 +19,8 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
......@@ -42,8 +44,11 @@ public class ProgramDetailActivity extends AppCompatActivity implements ProgramA
private final FirebaseDatabase firebaseDb = FirebaseDatabase.getInstance();
private DatabaseReference db;
private FirebaseAuth mAuth;
private HashMap<String, ArrayList<Exercise>> programHash;
ImageButton return_btn;
TextView start_workout, delete_workout, show_workout;
TextView start_workout, delete_workout, show_workout, share_workout;
private boolean isLocalProgram = false;
private String[][] exercisesData = null;
private ArrayList<ArrayList<String>> allExercices = new ArrayList<ArrayList<String>>();
......@@ -76,6 +81,9 @@ public class ProgramDetailActivity extends AppCompatActivity implements ProgramA
return_btn = findViewById(R.id.return_btn2);
return_btn.setOnClickListener(view -> finish());
share_workout = findViewById(R.id.share_workout);
share_workout.setOnClickListener(view -> {shareWorkout();});
start_workout = findViewById(R.id.start_workout);
start_workout.setOnClickListener(view -> {
Intent intent = new Intent(ProgramDetailActivity.this, WorkoutActivity.class);
......@@ -94,6 +102,78 @@ public class ProgramDetailActivity extends AppCompatActivity implements ProgramA
});
}
private void shareWorkout(){
mAuth = FirebaseAuth.getInstance();
FirebaseUser currentUser = mAuth.getCurrentUser();
if (currentUser != null) {
AlertDialog.Builder builder = new AlertDialog.Builder(ProgramDetailActivity.this);
LayoutInflater inflater = getLayoutInflater();
View dialogView = inflater.inflate(R.layout.share_friends_popup, null);
builder.setView(dialogView);
db = firebaseDb.getReference("Account_pseudo");
db.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
for (DataSnapshot childSnapshot: dataSnapshot.getChildren()) {
String userKey = childSnapshot.getKey();
String pseudo = childSnapshot.getValue(String.class);
if(Objects.equals(userKey, currentUser.getUid())){
String userPseudo = pseudo;
db = firebaseDb.getReference("Friends");
db.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
DataSnapshot friendsList = dataSnapshot.child(pseudo);
String[][] friendsData = new String[(int) friendsList.getChildrenCount()][];
int i = 0;
for (DataSnapshot childFriendList: friendsList.getChildren()) {
String friendPseudo = childFriendList.getKey();
friendsData[i] = new String[]{friendPseudo};
i ++;
}
RecyclerView recyclerView2 = dialogView.findViewById(R.id.share_friends_recycler);
recyclerView2.setLayoutManager(new LinearLayoutManager(ProgramDetailActivity.this));
SharingAdapter adapter = new SharingAdapter(friendsData, userPseudo, programHash);
adapter.setOnItemClickListener(new SharingAdapter.OnItemClickListener() {
@Override
public void onItemClick(String friend_pseudo) {
System.out.println(friend_pseudo);
}
});
recyclerView2.setAdapter(adapter);
}
@Override
public void onCancelled(@NonNull DatabaseError error) {
// Failed to read value
}
});
return;
}
}
}
@Override
public void onCancelled(@NonNull DatabaseError error) {
Toast.makeText(ProgramDetailActivity.this, "Une erreur est survenue !", Toast.LENGTH_SHORT).show();
finish();
}
});
AlertDialog dialog = builder.create();
dialog.show();
ImageView closeShareButton = dialogView.findViewById(R.id.close_share_btn);
closeShareButton.setOnClickListener(v -> dialog.dismiss());
}
}
private void showWorkout() {
Dialog dialog = new Dialog(ProgramDetailActivity.this);
......@@ -234,6 +314,8 @@ public class ProgramDetailActivity extends AppCompatActivity implements ProgramA
// ici tu peux utiliser entry comme programme perso
HashMap<String, ArrayList<Exercise>> entry = exerciseEntry.getEntry();
programHash = entry;
for (Map.Entry<String, ArrayList<Exercise>> entrySet : entry.entrySet()) {
String key = entrySet.getKey(); // Récupération de la clé
ArrayList<Exercise> value = entrySet.getValue(); // Récupération de la valeur correspondante
......
package be.lepl1509group13.workoutwarrior;
import android.annotation.SuppressLint;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.ValueEventListener;
import com.google.gson.Gson;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
public class SharingAdapter extends RecyclerView.Adapter<SharingAdapter.MyViewHolder>{
private final String[][] friendData;
private final FirebaseDatabase firebaseDb = FirebaseDatabase.getInstance();
private DatabaseReference db;
private final String sender;
private final HashMap<String, ArrayList<Exercise>> programHash;
private OnItemClickListener mListener;
public SharingAdapter(String[][] data, String from, HashMap<String, ArrayList<Exercise>> progHash) {
friendData = data;
sender = from;
programHash = progHash;
}
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.sharing_item, parent, false);
return new MyViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull MyViewHolder holder, @SuppressLint("RecyclerView") int position) {
// Parcourir la liste et afficher le contenu de chaque tableau
String[] friend_data = friendData[position];
holder.pseudo.setText(friend_data[0]);
holder.share.setOnClickListener(view -> {
if (mListener != null) {
System.out.println(sender);
System.out.println(friend_data[0]);
System.out.println(programHash);
writeOnDatabase(sender,friend_data[0],programHash);
}
});
}
public void writeOnDatabase(String from, String to, HashMap<String, ArrayList<Exercise>> sharedProgram){
Gson gson = new Gson();
String json = gson.toJson(sharedProgram);
db = firebaseDb.getReference("Shared_program").child(to).child(from);
db.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
long count = dataSnapshot.getChildrenCount();
Map<String, Object> updates = new HashMap<>();
updates.put(String.valueOf(count), json);
db.updateChildren(updates);
System.out.println("done!");
}
@Override
public void onCancelled(DatabaseError databaseError) {
System.out.println("Database error: " + databaseError.getMessage());
}
});
Type type = new TypeToken<HashMap<String, ArrayList<Exercise>>>(){}.getType();
HashMap<String, ArrayList<Exercise>> testProgram = gson.fromJson(json, type);
System.out.println("Json: " + json);
System.out.println("HashMap<String, ArrayList<Exercise>>: " + testProgram);
System.out.println(testProgram);
}
@Override
public int getItemCount() {
return friendData.length;
}
public void setOnItemClickListener(OnItemClickListener listener) {
mListener = listener;
}
public interface OnItemClickListener {
void onItemClick(String friend_pseudo);
}
public static class MyViewHolder extends RecyclerView.ViewHolder {
public TextView pseudo;
public ImageView share;
public MyViewHolder(View itemView) {
super(itemView);
pseudo = itemView.findViewById(R.id.friend_share_pseudo);
share = itemView.findViewById(R.id.friend_share_btn);
}
}
}
......@@ -111,6 +111,21 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/share_workout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="80dp"
android:background="@color/orange"
android:backgroundTint="@color/orange"
android:text="@string/share_workout"
android:textColor="@color/black"
android:translationX="80dp"
app:iconTint="@color/orange"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/show_workout"
android:layout_width="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ProgramDetailActivity">
<TextView
android:id="@+id/share_title"
android:layout_width="375dp"
android:layout_height="38dp"
android:layout_marginTop="80dp"
android:fontFamily="@font/poppins"
android:gravity="center"
android:text="Partage à un ami"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ScrollView
android:id="@+id/scrollView_program_view"
android:layout_width="377dp"
android:layout_height="400dp"
android:fillViewport="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/share_title">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/share_friends_recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</ScrollView>
<ImageView
android:id="@+id/close_share_btn"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/close_btn" />
</androidx.constraintlayout.widget.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/share_popup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="20dp"
android:layout_marginBottom="60dp"
android:padding="15dp">
<TextView
android:id="@+id/share_popup_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/poppins_semibold"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="test" />
<TextView
android:id="@+id/share_popup_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/poppins"
android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/share_popup_title"
tools:text="test"
android:textSize="20sp" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/friend_share_layout"
android:layout_width="325dp"
android:layout_height="50dp"
android:layout_marginTop="25dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/border_orange"
android:padding="10dp">
<TextView
android:id="@+id/friend_share_pseudo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/poppins"
android:text="Pseudo"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/friend_share_btn"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@android:drawable/ic_menu_send" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
......@@ -24,4 +24,5 @@
<string name="add_friend_activity_title">Entrez le pseudo de l\'ami à ajouter</string>
<string name="add_friend_activity_btn_text">Ajouter</string>
<string name="login_title">Veuillez d\'abord vous connecter</string>
<string name="share_workout">Partager</string>
</resources>
......@@ -8,6 +8,7 @@ buildscript {
classpath "com.android.tools.build:gradle:7.0.0"
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
......