Affichage des parties déjà jouées
This commit is contained in:
		@@ -7,8 +7,8 @@ android {
 | 
			
		||||
        applicationId "fr.ynerant.tarot"
 | 
			
		||||
        minSdkVersion 24
 | 
			
		||||
        targetSdkVersion 29
 | 
			
		||||
        versionCode 3
 | 
			
		||||
        versionName "0.1.0"
 | 
			
		||||
        versionCode 4
 | 
			
		||||
        versionName "0.2.0"
 | 
			
		||||
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 | 
			
		||||
    }
 | 
			
		||||
    buildTypes {
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,8 @@ package fr.ynerant.tarot;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.preference.PreferenceManager;
 | 
			
		||||
import android.util.SparseArray;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
 | 
			
		||||
import com.google.gson.Gson;
 | 
			
		||||
import com.google.gson.GsonBuilder;
 | 
			
		||||
@@ -20,6 +21,7 @@ import java.text.DateFormat;
 | 
			
		||||
import java.text.ParseException;
 | 
			
		||||
import java.text.SimpleDateFormat;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Comparator;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
@@ -28,9 +30,12 @@ import java.util.concurrent.Executors;
 | 
			
		||||
 | 
			
		||||
public class Game {
 | 
			
		||||
	private static final Gson GSON;
 | 
			
		||||
	private static final SparseArray<Game> GAMES = new SparseArray<>();
 | 
			
		||||
	@SuppressLint("UseSparseArrays")
 | 
			
		||||
	private static final Map<Integer, Game> GAMES = new HashMap<>();
 | 
			
		||||
 | 
			
		||||
	@SuppressWarnings("unused")
 | 
			
		||||
	private int id;
 | 
			
		||||
	@SuppressWarnings("unused")
 | 
			
		||||
	private Date date;
 | 
			
		||||
	private GameType gameType;
 | 
			
		||||
	@SuppressWarnings("unused")
 | 
			
		||||
@@ -100,7 +105,7 @@ public class Game {
 | 
			
		||||
			}
 | 
			
		||||
		}).registerTypeAdapter(Date.class, new TypeAdapter<Date>() {
 | 
			
		||||
			@SuppressLint("SimpleDateFormat")
 | 
			
		||||
			final DateFormat FORMAT = new SimpleDateFormat("yyyy-mm-dd HH:MM:ss");
 | 
			
		||||
			final DateFormat FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 | 
			
		||||
 | 
			
		||||
			@Override
 | 
			
		||||
			public void write(JsonWriter out, Date value) throws IOException {
 | 
			
		||||
@@ -271,8 +276,6 @@ public class Game {
 | 
			
		||||
		else if (chelem_realized)
 | 
			
		||||
			score += 200;
 | 
			
		||||
 | 
			
		||||
		attack_score = score;
 | 
			
		||||
 | 
			
		||||
		Map<Player, Integer> scores = new HashMap<>();
 | 
			
		||||
 | 
			
		||||
		for (int i = 0; i < getGameType().getNbPlayers(); ++i) {
 | 
			
		||||
@@ -314,57 +317,31 @@ public class Game {
 | 
			
		||||
		return GSON.toJson(this);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public enum GameType {
 | 
			
		||||
		THREE_PLAYERS(2, 0), FOUR_PLAYERS(3, 0), FIVE_PLAYERS(2, 1), SIX_PLAYERS(3, 1);
 | 
			
		||||
 | 
			
		||||
		private final int attackMultiplier;
 | 
			
		||||
		private final int followMultiplier;
 | 
			
		||||
 | 
			
		||||
		GameType(int attack, int follow) {
 | 
			
		||||
			this.attackMultiplier = attack;
 | 
			
		||||
			this.followMultiplier = follow;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public int getAttackMultiplier() {
 | 
			
		||||
			return attackMultiplier;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public int getFollowMultiplier() {
 | 
			
		||||
			return followMultiplier;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public int getNbPlayers() {
 | 
			
		||||
			return ordinal() + 3;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public static GameType getGameType(int players) {
 | 
			
		||||
			switch (players) {
 | 
			
		||||
				case 3:
 | 
			
		||||
					return THREE_PLAYERS;
 | 
			
		||||
				case 4:
 | 
			
		||||
					return FOUR_PLAYERS;
 | 
			
		||||
				case 5:
 | 
			
		||||
					return FIVE_PLAYERS;
 | 
			
		||||
				case 6:
 | 
			
		||||
					return SIX_PLAYERS;
 | 
			
		||||
				default:
 | 
			
		||||
					throw new IllegalArgumentException("A game must have between 3 and 6 players");
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	@NonNull
 | 
			
		||||
	@Override
 | 
			
		||||
	public String toString() {
 | 
			
		||||
		SimpleDateFormat format = new SimpleDateFormat("dd MMMM yyyy HH:mm:ss");
 | 
			
		||||
		String str = "Partie à " + getGameType().getNbPlayers() + " joueurs : ";
 | 
			
		||||
		for (Player player : getPlayers())
 | 
			
		||||
			str += player.getName() + ", ";
 | 
			
		||||
		str += getBet().toString() + " de " + getAttacker().getName() + " " + (getAttackScore() >= (ends == 0 ? 56 : ends == 1 ? 51 : ends == 2 ? 41 : 36) ? "gagnée" : "chutée") + ", ";
 | 
			
		||||
		str += format.format(getDate());
 | 
			
		||||
		return str;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public enum Bet {
 | 
			
		||||
		SMALL(1), GUARD(2), GUARD_WITHOUT(4), GUARD_AGAINST(6);
 | 
			
		||||
	public static Game getGameById(int id) {
 | 
			
		||||
		return GAMES.get(id);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		private final int multiplier;
 | 
			
		||||
 | 
			
		||||
		Bet(int multiplier) {
 | 
			
		||||
			this.multiplier = multiplier;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public int getMultiplier() {
 | 
			
		||||
			return multiplier;
 | 
			
		||||
		}
 | 
			
		||||
	public static List<Game> getAllGames() {
 | 
			
		||||
		List<Game> list = new ArrayList<>(GAMES.values());
 | 
			
		||||
		list.sort(new Comparator<Game>() {
 | 
			
		||||
			@Override
 | 
			
		||||
			public int compare(Game o1, Game o2) {
 | 
			
		||||
				return o2.getDate().compareTo(o1.getDate());
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
		return list;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public static void updateGames() {
 | 
			
		||||
@@ -440,4 +417,74 @@ public class Game {
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public enum GameType {
 | 
			
		||||
		THREE_PLAYERS(2, 0), FOUR_PLAYERS(3, 0), FIVE_PLAYERS(2, 1), SIX_PLAYERS(3, 1);
 | 
			
		||||
 | 
			
		||||
		private final int attackMultiplier;
 | 
			
		||||
		private final int followMultiplier;
 | 
			
		||||
 | 
			
		||||
		GameType(int attack, int follow) {
 | 
			
		||||
			this.attackMultiplier = attack;
 | 
			
		||||
			this.followMultiplier = follow;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public int getAttackMultiplier() {
 | 
			
		||||
			return attackMultiplier;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public int getFollowMultiplier() {
 | 
			
		||||
			return followMultiplier;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public int getNbPlayers() {
 | 
			
		||||
			return ordinal() + 3;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public static GameType getGameType(int players) {
 | 
			
		||||
			switch (players) {
 | 
			
		||||
				case 3:
 | 
			
		||||
					return THREE_PLAYERS;
 | 
			
		||||
				case 4:
 | 
			
		||||
					return FOUR_PLAYERS;
 | 
			
		||||
				case 5:
 | 
			
		||||
					return FIVE_PLAYERS;
 | 
			
		||||
				case 6:
 | 
			
		||||
					return SIX_PLAYERS;
 | 
			
		||||
				default:
 | 
			
		||||
					throw new IllegalArgumentException("A game must have between 3 and 6 players");
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public enum Bet {
 | 
			
		||||
		SMALL(1), GUARD(2), GUARD_WITHOUT(4), GUARD_AGAINST(6);
 | 
			
		||||
 | 
			
		||||
		private final int multiplier;
 | 
			
		||||
 | 
			
		||||
		Bet(int multiplier) {
 | 
			
		||||
			this.multiplier = multiplier;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public int getMultiplier() {
 | 
			
		||||
			return multiplier;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		@NonNull
 | 
			
		||||
		@Override
 | 
			
		||||
		public String toString() {
 | 
			
		||||
			switch (this) {
 | 
			
		||||
				case SMALL:
 | 
			
		||||
					return "Petite";
 | 
			
		||||
				case GUARD:
 | 
			
		||||
					return "Garde";
 | 
			
		||||
				case GUARD_WITHOUT:
 | 
			
		||||
					return "Garde sans";
 | 
			
		||||
				case GUARD_AGAINST:
 | 
			
		||||
					return "Garde contre";
 | 
			
		||||
				default:
 | 
			
		||||
					return "null";
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,7 @@ public class MainActivity extends AppCompatActivity {
 | 
			
		||||
        // Passing each menu ID as a set of Ids because each
 | 
			
		||||
        // menu should be considered as top level destinations.
 | 
			
		||||
        mAppBarConfiguration = new AppBarConfiguration.Builder(
 | 
			
		||||
                R.id.nav_new_game, R.id.nav_personal_stats)
 | 
			
		||||
                R.id.nav_new_game)
 | 
			
		||||
                .setDrawerLayout(drawer)
 | 
			
		||||
                .build();
 | 
			
		||||
        NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,111 @@
 | 
			
		||||
package fr.ynerant.tarot.ui.games;
 | 
			
		||||
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.preference.PreferenceManager;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.LinearLayout;
 | 
			
		||||
import android.widget.TextView;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.fragment.app.Fragment;
 | 
			
		||||
import androidx.lifecycle.ViewModelProviders;
 | 
			
		||||
 | 
			
		||||
import fr.ynerant.tarot.Game;
 | 
			
		||||
import fr.ynerant.tarot.MainActivity;
 | 
			
		||||
import fr.ynerant.tarot.Player;
 | 
			
		||||
import fr.ynerant.tarot.R;
 | 
			
		||||
import fr.ynerant.tarot.ui.home.HomeFragment;
 | 
			
		||||
 | 
			
		||||
public class GameInfoFragment extends Fragment {
 | 
			
		||||
 | 
			
		||||
	public View onCreateView(@NonNull LayoutInflater inflater,
 | 
			
		||||
							 ViewGroup container, final Bundle savedInstanceState) {
 | 
			
		||||
		ViewModelProviders.of(this).get(GameInfoModel.class);
 | 
			
		||||
		final View root = inflater.inflate(R.layout.fragment_game_info, container, false);
 | 
			
		||||
 | 
			
		||||
		if (PreferenceManager.getDefaultSharedPreferences(MainActivity.INSTANCE).getString("token", null) == null) {
 | 
			
		||||
			//noinspection ConstantConditions
 | 
			
		||||
			getFragmentManager().beginTransaction().replace(R.id.nav_host_fragment, new HomeFragment(), "Se connecter").commit();
 | 
			
		||||
			return root;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		Game game = Game.getGameById(getArguments().getInt("gameId"));
 | 
			
		||||
 | 
			
		||||
		TextView points1 = root.findViewById(R.id.player1_points);
 | 
			
		||||
		TextView points2 = root.findViewById(R.id.player2_points);
 | 
			
		||||
		TextView points3 = root.findViewById(R.id.player3_points);
 | 
			
		||||
		TextView points4 = root.findViewById(R.id.player4_points);
 | 
			
		||||
		TextView points5 = root.findViewById(R.id.player5_points);
 | 
			
		||||
		TextView points6 = root.findViewById(R.id.player6_points);
 | 
			
		||||
		TextView[] points = new TextView[]{points1, points2, points3, points4, points5, points6};
 | 
			
		||||
		TextView points1Text = root.findViewById(R.id.player1_points_text);
 | 
			
		||||
		TextView points2Text = root.findViewById(R.id.player2_points_text);
 | 
			
		||||
		TextView points3Text = root.findViewById(R.id.player3_points_text);
 | 
			
		||||
		TextView points4Text = root.findViewById(R.id.player4_points_text);
 | 
			
		||||
		TextView points5Text = root.findViewById(R.id.player5_points_text);
 | 
			
		||||
		TextView points6Text = root.findViewById(R.id.player6_points_text);
 | 
			
		||||
		TextView[] pointsText = new TextView[]{points1Text, points2Text, points3Text, points4Text, points5Text, points6Text};
 | 
			
		||||
 | 
			
		||||
		for (int i = 0; i < game.getGameType().getNbPlayers(); ++i) {
 | 
			
		||||
			System.out.println(i + ", " + game.getGameType());
 | 
			
		||||
			pointsText[i].setVisibility(View.VISIBLE);
 | 
			
		||||
			pointsText[i].setText(game.getPlayers().get(i).getName());
 | 
			
		||||
			points[i].setVisibility(View.VISIBLE);
 | 
			
		||||
			points[i].setText(String.valueOf(game.getPoints(i)));
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		TextView attacker = root.findViewById(R.id.attacker);
 | 
			
		||||
		TextView follower = root.findViewById(R.id.follower);
 | 
			
		||||
		LinearLayout followerLayout = root.findViewById(R.id.follower_layout);
 | 
			
		||||
 | 
			
		||||
		attacker.setText(game.getAttacker().getName());
 | 
			
		||||
 | 
			
		||||
		if (game.getGameType() == Game.GameType.FIVE_PLAYERS || game.getGameType() == Game.GameType.SIX_PLAYERS) {
 | 
			
		||||
			followerLayout.setVisibility(View.VISIBLE);
 | 
			
		||||
			follower.setText(game.getFollower().getName());
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		TextView bet = root.findViewById(R.id.bet);
 | 
			
		||||
		bet.setText(game.getBet().toString());
 | 
			
		||||
 | 
			
		||||
		TextView ends = root.findViewById(R.id.ends);
 | 
			
		||||
		ends.setText(game.getEnds() + " bout" + (game.getEnds() >= 2 ? "s" : ""));
 | 
			
		||||
 | 
			
		||||
		TextView attackScore = root.findViewById(R.id.attack_score);
 | 
			
		||||
		attackScore.setText(String.valueOf(game.getAttackScore()));
 | 
			
		||||
 | 
			
		||||
		TextView chelem = root.findViewById(R.id.chelem);
 | 
			
		||||
		chelem.setText((game.isChelemAnnounced() ? "" : "non ") + "annoncé, " + (game.isChelemRealized() ? "" : "non ") + "réalisé");
 | 
			
		||||
 | 
			
		||||
		TextView littleEnd = root.findViewById(R.id.little_end);
 | 
			
		||||
		littleEnd.setText(game.getLittleEnd() == 0 ? "Non" : game.getPlayers().get(game.getLittleEnd() - 1).getName());
 | 
			
		||||
 | 
			
		||||
		TextView handles = root.findViewById(R.id.handles);
 | 
			
		||||
		String handlesStr = "";
 | 
			
		||||
		for (int i = 0; i < game.getGameType().getNbPlayers(); ++i) {
 | 
			
		||||
			if (game.getHandles().get(i) > 0)
 | 
			
		||||
				handlesStr += game.getPlayers().get(i) + " (" + (game.getHandles().get(i) == 1 ? "simple" : game.getHandles().get(i) == 2 ? "double" : "triple") + "), ";
 | 
			
		||||
		}
 | 
			
		||||
		if (handlesStr.isEmpty())
 | 
			
		||||
			handlesStr = "Pas de poignée";
 | 
			
		||||
		else
 | 
			
		||||
			handlesStr = handlesStr.substring(0, handlesStr.length() - 2);
 | 
			
		||||
		handles.setText(handlesStr);
 | 
			
		||||
 | 
			
		||||
		TextView miseries = root.findViewById(R.id.miseries);
 | 
			
		||||
		String miseriesStr = "";
 | 
			
		||||
		for (int i = 0; i < game.getGameType().getNbPlayers(); ++i) {
 | 
			
		||||
			if (game.getMiseries().get(i))
 | 
			
		||||
				miseriesStr += game.getPlayers().get(i) + ", ";
 | 
			
		||||
		}
 | 
			
		||||
		if (miseriesStr.isEmpty())
 | 
			
		||||
			miseriesStr = "Pas de misère";
 | 
			
		||||
		else
 | 
			
		||||
			miseriesStr = miseriesStr.substring(0, miseriesStr.length() - 2);
 | 
			
		||||
		miseries.setText(miseriesStr);
 | 
			
		||||
 | 
			
		||||
		return root;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,6 @@
 | 
			
		||||
package fr.ynerant.tarot.ui.games;
 | 
			
		||||
 | 
			
		||||
import androidx.lifecycle.ViewModel;
 | 
			
		||||
 | 
			
		||||
public class GameInfoModel extends ViewModel {
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,57 @@
 | 
			
		||||
package fr.ynerant.tarot.ui.games;
 | 
			
		||||
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.preference.PreferenceManager;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.AdapterView;
 | 
			
		||||
import android.widget.ArrayAdapter;
 | 
			
		||||
import android.widget.ListAdapter;
 | 
			
		||||
import android.widget.ListView;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.fragment.app.Fragment;
 | 
			
		||||
import androidx.lifecycle.ViewModelProviders;
 | 
			
		||||
 | 
			
		||||
import fr.ynerant.tarot.Game;
 | 
			
		||||
import fr.ynerant.tarot.MainActivity;
 | 
			
		||||
import fr.ynerant.tarot.Player;
 | 
			
		||||
import fr.ynerant.tarot.R;
 | 
			
		||||
import fr.ynerant.tarot.ui.home.HomeFragment;
 | 
			
		||||
import fr.ynerant.tarot.ui.stats.PersonalStatsFragment;
 | 
			
		||||
 | 
			
		||||
public class GamesMenuFragment extends Fragment {
 | 
			
		||||
 | 
			
		||||
	public View onCreateView(@NonNull LayoutInflater inflater,
 | 
			
		||||
							 ViewGroup container, final Bundle savedInstanceState) {
 | 
			
		||||
		ViewModelProviders.of(this).get(GamesMenuModel.class);
 | 
			
		||||
		final View root = inflater.inflate(R.layout.fragment_games_menu, container, false);
 | 
			
		||||
 | 
			
		||||
		if (PreferenceManager.getDefaultSharedPreferences(MainActivity.INSTANCE).getString("token", null) == null) {
 | 
			
		||||
			//noinspection ConstantConditions
 | 
			
		||||
			getFragmentManager().beginTransaction().replace(R.id.nav_games, new HomeFragment(), "Se connecter").commit();
 | 
			
		||||
			return root;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		ListView gameList = root.findViewById(R.id.game_list);
 | 
			
		||||
		final ListAdapter adapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_expandable_list_item_1, Game.getAllGames());
 | 
			
		||||
		gameList.setAdapter(adapter);
 | 
			
		||||
 | 
			
		||||
		gameList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
 | 
			
		||||
			@Override
 | 
			
		||||
			public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
 | 
			
		||||
				Game game = (Game) adapter.getItem(position);
 | 
			
		||||
				GameInfoFragment fragment = new GameInfoFragment();
 | 
			
		||||
				Bundle bundle = new Bundle();
 | 
			
		||||
				bundle.putInt("gameId", game.getId());
 | 
			
		||||
				fragment.setArguments(bundle);
 | 
			
		||||
				//noinspection ConstantConditions
 | 
			
		||||
				getFragmentManager().beginTransaction().replace(R.id.nav_host_fragment, fragment, "Détails d'une partie")
 | 
			
		||||
						.addToBackStack("Détails d'une partie").commit();
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		return root;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,6 @@
 | 
			
		||||
package fr.ynerant.tarot.ui.games;
 | 
			
		||||
 | 
			
		||||
import androidx.lifecycle.ViewModel;
 | 
			
		||||
 | 
			
		||||
public class GamesMenuModel extends ViewModel {
 | 
			
		||||
}
 | 
			
		||||
@@ -47,6 +47,14 @@ public class NewGameFragment extends Fragment {
 | 
			
		||||
			return root;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		while (Player.getAllPlayers().isEmpty()) {
 | 
			
		||||
			try {
 | 
			
		||||
				Thread.sleep(500L);
 | 
			
		||||
			} catch (InterruptedException e) {
 | 
			
		||||
				e.printStackTrace();
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		TextView textView = root.findViewById(R.id.text_new_game);
 | 
			
		||||
		textView.setText(R.string.menu_new_game);
 | 
			
		||||
 | 
			
		||||
@@ -86,7 +94,6 @@ public class NewGameFragment extends Fragment {
 | 
			
		||||
		final Spinner attacker = root.findViewById(R.id.attacker);
 | 
			
		||||
		final Spinner follower = root.findViewById(R.id.follower);
 | 
			
		||||
		final LinearLayout follower_layout = root.findViewById(R.id.follower_layout);
 | 
			
		||||
		final Spinner dealer = root.findViewById(R.id.dealer);
 | 
			
		||||
		final SeekBar attack_points = root.findViewById(R.id.attack_score);
 | 
			
		||||
		final SeekBar bet = root.findViewById(R.id.bet);
 | 
			
		||||
		final SeekBar nb_ends = root.findViewById(R.id.nb_ends);
 | 
			
		||||
@@ -198,7 +205,6 @@ public class NewGameFragment extends Fragment {
 | 
			
		||||
				ArrayAdapter<Player> adapter  = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, new ArrayList<>(players));
 | 
			
		||||
				adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
 | 
			
		||||
				attacker.setAdapter(adapter);
 | 
			
		||||
				dealer.setAdapter(adapter);
 | 
			
		||||
				follower.setAdapter(adapter);
 | 
			
		||||
 | 
			
		||||
				for (int i = 0; i < 6; ++i) {
 | 
			
		||||
@@ -240,7 +246,6 @@ public class NewGameFragment extends Fragment {
 | 
			
		||||
		}
 | 
			
		||||
		attacker.setOnItemSelectedListener(justUpdate);
 | 
			
		||||
		follower.setOnItemSelectedListener(justUpdate);
 | 
			
		||||
		dealer.setOnItemSelectedListener(justUpdate);
 | 
			
		||||
 | 
			
		||||
		nb_players.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
 | 
			
		||||
			@Override
 | 
			
		||||
 
 | 
			
		||||
@@ -67,7 +67,7 @@ public class PersonalStatsMenuFragment extends Fragment {
 | 
			
		||||
				fragment.setArguments(bundle);
 | 
			
		||||
				//noinspection ConstantConditions
 | 
			
		||||
				getFragmentManager().beginTransaction().replace(R.id.nav_host_fragment, fragment, "Statistiques individuelles de " + player.getName())
 | 
			
		||||
						.addToBackStack("Statistiques individuelles").commit();
 | 
			
		||||
						.addToBackStack("Statistiques individuelles de " + player.getName()).commit();
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										302
									
								
								app/src/main/res/layout/fragment_game_info.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										302
									
								
								app/src/main/res/layout/fragment_game_info.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,302 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
	android:layout_width="match_parent"
 | 
			
		||||
	android:layout_height="match_parent"
 | 
			
		||||
	android:orientation="vertical">
 | 
			
		||||
 | 
			
		||||
	<ScrollView
 | 
			
		||||
		android:layout_width="match_parent"
 | 
			
		||||
		android:layout_height="match_parent">
 | 
			
		||||
 | 
			
		||||
		<LinearLayout
 | 
			
		||||
			android:layout_width="match_parent"
 | 
			
		||||
			android:layout_height="wrap_content"
 | 
			
		||||
			android:orientation="vertical">
 | 
			
		||||
 | 
			
		||||
			<HorizontalScrollView
 | 
			
		||||
				android:layout_width="wrap_content"
 | 
			
		||||
				android:layout_height="wrap_content">
 | 
			
		||||
 | 
			
		||||
				<TableLayout
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:orientation="horizontal"
 | 
			
		||||
					android:textAlignment="center">
 | 
			
		||||
 | 
			
		||||
					<TableRow
 | 
			
		||||
						android:layout_width="match_parent"
 | 
			
		||||
						android:layout_height="match_parent">
 | 
			
		||||
 | 
			
		||||
						<TextView
 | 
			
		||||
							android:id="@+id/player1_points_text"
 | 
			
		||||
							android:layout_width="wrap_content"
 | 
			
		||||
							android:layout_height="wrap_content"
 | 
			
		||||
							android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
						<TextView
 | 
			
		||||
							android:id="@+id/player2_points_text"
 | 
			
		||||
							android:layout_width="wrap_content"
 | 
			
		||||
							android:layout_height="wrap_content"
 | 
			
		||||
							android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
						<TextView
 | 
			
		||||
							android:id="@+id/player3_points_text"
 | 
			
		||||
							android:layout_width="wrap_content"
 | 
			
		||||
							android:layout_height="wrap_content"
 | 
			
		||||
							android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
						<TextView
 | 
			
		||||
							android:id="@+id/player4_points_text"
 | 
			
		||||
							android:layout_width="wrap_content"
 | 
			
		||||
							android:layout_height="wrap_content"
 | 
			
		||||
							android:textSize="18sp"
 | 
			
		||||
							android:visibility="gone" />
 | 
			
		||||
 | 
			
		||||
						<TextView
 | 
			
		||||
							android:id="@+id/player5_points_text"
 | 
			
		||||
							android:layout_width="wrap_content"
 | 
			
		||||
							android:layout_height="wrap_content"
 | 
			
		||||
							android:textSize="18sp"
 | 
			
		||||
							android:visibility="gone" />
 | 
			
		||||
 | 
			
		||||
						<TextView
 | 
			
		||||
							android:id="@+id/player6_points_text"
 | 
			
		||||
							android:layout_width="wrap_content"
 | 
			
		||||
							android:layout_height="wrap_content"
 | 
			
		||||
							android:textSize="18sp"
 | 
			
		||||
							android:visibility="gone" />
 | 
			
		||||
					</TableRow>
 | 
			
		||||
 | 
			
		||||
					<TableRow
 | 
			
		||||
						android:layout_width="match_parent"
 | 
			
		||||
						android:layout_height="match_parent">
 | 
			
		||||
 | 
			
		||||
						<TextView
 | 
			
		||||
							android:id="@+id/player1_points"
 | 
			
		||||
							android:layout_width="wrap_content"
 | 
			
		||||
							android:layout_height="wrap_content"
 | 
			
		||||
							android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
						<TextView
 | 
			
		||||
							android:id="@+id/player2_points"
 | 
			
		||||
							android:layout_width="wrap_content"
 | 
			
		||||
							android:layout_height="wrap_content"
 | 
			
		||||
							android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
						<TextView
 | 
			
		||||
							android:id="@+id/player3_points"
 | 
			
		||||
							android:layout_width="wrap_content"
 | 
			
		||||
							android:layout_height="wrap_content"
 | 
			
		||||
							android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
						<TextView
 | 
			
		||||
							android:id="@+id/player4_points"
 | 
			
		||||
							android:layout_width="wrap_content"
 | 
			
		||||
							android:layout_height="wrap_content"
 | 
			
		||||
							android:textSize="18sp"
 | 
			
		||||
							android:visibility="gone" />
 | 
			
		||||
 | 
			
		||||
						<TextView
 | 
			
		||||
							android:id="@+id/player5_points"
 | 
			
		||||
							android:layout_width="wrap_content"
 | 
			
		||||
							android:layout_height="wrap_content"
 | 
			
		||||
							android:textSize="18sp"
 | 
			
		||||
							android:visibility="gone" />
 | 
			
		||||
 | 
			
		||||
						<TextView
 | 
			
		||||
							android:id="@+id/player6_points"
 | 
			
		||||
							android:layout_width="wrap_content"
 | 
			
		||||
							android:layout_height="wrap_content"
 | 
			
		||||
							android:textSize="18sp"
 | 
			
		||||
							android:visibility="gone" />
 | 
			
		||||
					</TableRow>
 | 
			
		||||
 | 
			
		||||
				</TableLayout>
 | 
			
		||||
			</HorizontalScrollView>
 | 
			
		||||
 | 
			
		||||
			<LinearLayout
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:orientation="horizontal">
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:text="Preneur :"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:id="@+id/attacker"
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
			</LinearLayout>
 | 
			
		||||
 | 
			
		||||
			<LinearLayout
 | 
			
		||||
				android:id="@id/follower_layout"
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:orientation="horizontal"
 | 
			
		||||
				android:visibility="gone">
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:text="Suiveur :"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:id="@+id/follower"
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
			</LinearLayout>
 | 
			
		||||
 | 
			
		||||
			<LinearLayout
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:orientation="horizontal">
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:text="Mise :"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:id="@+id/bet"
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
			</LinearLayout>
 | 
			
		||||
 | 
			
		||||
			<LinearLayout
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:orientation="horizontal">
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:text="Nombre de bouts :"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:id="@+id/ends"
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
			</LinearLayout>
 | 
			
		||||
 | 
			
		||||
			<LinearLayout
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:orientation="horizontal">
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:text="Points en attaque :"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:id="@+id/attack_score"
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
			</LinearLayout>
 | 
			
		||||
 | 
			
		||||
			<LinearLayout
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:orientation="horizontal">
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:text="Chelem :"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:id="@+id/chelem"
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
			</LinearLayout>
 | 
			
		||||
 | 
			
		||||
			<LinearLayout
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:orientation="horizontal">
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:text="Petit au bout :"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:id="@+id/little_end"
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
			</LinearLayout>
 | 
			
		||||
 | 
			
		||||
			<LinearLayout
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:orientation="horizontal">
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:text="Poignées :"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:id="@+id/handles"
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
			</LinearLayout>
 | 
			
		||||
 | 
			
		||||
			<LinearLayout
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:orientation="horizontal">
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:text="Misères :"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
				<TextView
 | 
			
		||||
					android:id="@+id/miseries"
 | 
			
		||||
					android:layout_width="wrap_content"
 | 
			
		||||
					android:layout_height="wrap_content"
 | 
			
		||||
					android:layout_weight="1"
 | 
			
		||||
					android:textSize="18sp" />
 | 
			
		||||
			</LinearLayout>
 | 
			
		||||
 | 
			
		||||
		</LinearLayout>
 | 
			
		||||
 | 
			
		||||
	</ScrollView>
 | 
			
		||||
</LinearLayout>
 | 
			
		||||
							
								
								
									
										12
									
								
								app/src/main/res/layout/fragment_games_menu.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								app/src/main/res/layout/fragment_games_menu.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
    android:layout_width="match_parent"
 | 
			
		||||
    android:layout_height="match_parent"
 | 
			
		||||
    android:orientation="vertical">
 | 
			
		||||
 | 
			
		||||
    <ListView
 | 
			
		||||
        android:id="@+id/game_list"
 | 
			
		||||
        android:layout_width="match_parent"
 | 
			
		||||
        android:layout_height="wrap_content" />
 | 
			
		||||
 | 
			
		||||
</LinearLayout>
 | 
			
		||||
@@ -202,24 +202,6 @@
 | 
			
		||||
				android:layout_height="wrap_content" />
 | 
			
		||||
		</LinearLayout>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		<LinearLayout
 | 
			
		||||
			android:layout_width="match_parent"
 | 
			
		||||
			android:layout_height="match_parent"
 | 
			
		||||
			android:orientation="horizontal">
 | 
			
		||||
 | 
			
		||||
			<TextView
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:layout_weight="1"
 | 
			
		||||
				android:text="Dealer :" />
 | 
			
		||||
 | 
			
		||||
			<Spinner
 | 
			
		||||
				android:id="@+id/dealer"
 | 
			
		||||
				android:layout_width="wrap_content"
 | 
			
		||||
				android:layout_height="wrap_content" />
 | 
			
		||||
		</LinearLayout>
 | 
			
		||||
 | 
			
		||||
		<LinearLayout
 | 
			
		||||
			android:layout_width="match_parent"
 | 
			
		||||
			android:layout_height="wrap_content"
 | 
			
		||||
@@ -628,38 +610,38 @@
 | 
			
		||||
						android:id="@+id/player1_points_text"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp" />
 | 
			
		||||
						android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player2_points_text"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp" />
 | 
			
		||||
						android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player3_points_text"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp" />
 | 
			
		||||
						android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player4_points_text"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp" />
 | 
			
		||||
						android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player5_points_text"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp"
 | 
			
		||||
						android:textSize="18sp"
 | 
			
		||||
						android:visibility="gone" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player6_points_text"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp"
 | 
			
		||||
						android:textSize="18sp"
 | 
			
		||||
						android:visibility="gone" />
 | 
			
		||||
				</TableRow>
 | 
			
		||||
 | 
			
		||||
@@ -671,38 +653,38 @@
 | 
			
		||||
						android:id="@+id/player1_points"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp" />
 | 
			
		||||
						android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player2_points"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp" />
 | 
			
		||||
						android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player3_points"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp" />
 | 
			
		||||
						android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player4_points"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp" />
 | 
			
		||||
						android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player5_points"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp"
 | 
			
		||||
						android:textSize="18sp"
 | 
			
		||||
						android:visibility="gone" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player6_points"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp"
 | 
			
		||||
						android:textSize="18sp"
 | 
			
		||||
						android:visibility="gone" />
 | 
			
		||||
				</TableRow>
 | 
			
		||||
 | 
			
		||||
@@ -714,38 +696,38 @@
 | 
			
		||||
						android:id="@+id/player1_total_points"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp" />
 | 
			
		||||
						android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player2_total_points"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp" />
 | 
			
		||||
						android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player3_total_points"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp" />
 | 
			
		||||
						android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player4_total_points"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp" />
 | 
			
		||||
						android:textSize="18sp" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player5_total_points"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp"
 | 
			
		||||
						android:textSize="18sp"
 | 
			
		||||
						android:visibility="gone" />
 | 
			
		||||
 | 
			
		||||
					<TextView
 | 
			
		||||
						android:id="@+id/player6_total_points"
 | 
			
		||||
						android:layout_width="wrap_content"
 | 
			
		||||
						android:layout_height="wrap_content"
 | 
			
		||||
						android:textSize="24sp"
 | 
			
		||||
						android:textSize="18sp"
 | 
			
		||||
						android:visibility="gone" />
 | 
			
		||||
				</TableRow>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -12,14 +12,14 @@
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:layout_width="wrap_content"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:textSize="24sp"
 | 
			
		||||
                android:textSize="18sp"
 | 
			
		||||
                android:text="Points à 3 joueurs :"/>
 | 
			
		||||
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:id="@+id/points3"
 | 
			
		||||
                android:layout_width="match_parent"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:textSize="24sp"
 | 
			
		||||
                android:textSize="18sp"
 | 
			
		||||
                android:textAlignment="textEnd"/>
 | 
			
		||||
        </TableRow>
 | 
			
		||||
 | 
			
		||||
@@ -27,13 +27,13 @@
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:layout_width="wrap_content"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:textSize="24sp"
 | 
			
		||||
                android:textSize="18sp"
 | 
			
		||||
                android:text="Points à 4 joueurs :" />
 | 
			
		||||
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:id="@+id/points4"
 | 
			
		||||
                android:layout_width="wrap_content"
 | 
			
		||||
                android:textSize="24sp"
 | 
			
		||||
                android:textSize="18sp"
 | 
			
		||||
                android:layout_height="wrap_content" />
 | 
			
		||||
        </TableRow>
 | 
			
		||||
 | 
			
		||||
@@ -41,13 +41,13 @@
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:layout_width="wrap_content"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:textSize="24sp"
 | 
			
		||||
                android:textSize="18sp"
 | 
			
		||||
                android:text="Points à 5 joueurs :" />
 | 
			
		||||
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:id="@+id/points5"
 | 
			
		||||
                android:layout_width="wrap_content"
 | 
			
		||||
                android:textSize="24sp"
 | 
			
		||||
                android:textSize="18sp"
 | 
			
		||||
                android:layout_height="wrap_content" />
 | 
			
		||||
        </TableRow>
 | 
			
		||||
 | 
			
		||||
@@ -55,13 +55,13 @@
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:layout_width="wrap_content"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:textSize="24sp"
 | 
			
		||||
                android:textSize="18sp"
 | 
			
		||||
                android:text="Points à 6 joueurs :" />
 | 
			
		||||
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:id="@+id/points6"
 | 
			
		||||
                android:layout_width="wrap_content"
 | 
			
		||||
                android:textSize="24sp"
 | 
			
		||||
                android:textSize="18sp"
 | 
			
		||||
                android:layout_height="wrap_content" />
 | 
			
		||||
        </TableRow>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,11 @@
 | 
			
		||||
			android:id="@+id/nav_personal_stats"
 | 
			
		||||
			android:icon="@drawable/ic_launcher_foreground"
 | 
			
		||||
			android:title="@string/personal_stats" />
 | 
			
		||||
 | 
			
		||||
		<item
 | 
			
		||||
			android:id="@+id/nav_games"
 | 
			
		||||
			android:icon="@drawable/ic_launcher_foreground"
 | 
			
		||||
			android:title="@string/games" />
 | 
			
		||||
	</group>
 | 
			
		||||
 | 
			
		||||
</menu>
 | 
			
		||||
 
 | 
			
		||||
@@ -22,4 +22,10 @@
 | 
			
		||||
		android:name="fr.ynerant.tarot.ui.stats.PersonalStatsMenuFragment"
 | 
			
		||||
		android:label="@string/personal_stats"
 | 
			
		||||
		tools:layout="@layout/fragment_personal_stats_menu" />
 | 
			
		||||
 | 
			
		||||
	<fragment
 | 
			
		||||
		android:id="@+id/nav_games"
 | 
			
		||||
		android:name="fr.ynerant.tarot.ui.games.GamesMenuFragment"
 | 
			
		||||
		android:label="@string/games"
 | 
			
		||||
		tools:layout="@layout/fragment_games_menu" />
 | 
			
		||||
</navigation>
 | 
			
		||||
@@ -34,4 +34,5 @@
 | 
			
		||||
	<string name="nobody">Personne</string>
 | 
			
		||||
	<string name="yes">Oui</string>
 | 
			
		||||
    <string name="little">Petite</string>
 | 
			
		||||
	<string name="games">Parties</string>
 | 
			
		||||
</resources>
 | 
			
		||||
@@ -34,4 +34,5 @@
 | 
			
		||||
    <string name="nobody">Nobody</string>
 | 
			
		||||
    <string name="yes">Yes</string>
 | 
			
		||||
    <string name="little">Little</string>
 | 
			
		||||
	<string name="games">Parties</string>
 | 
			
		||||
</resources>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user