1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
| // Aleatoire choix de la question
btn_newQuest.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Resources res = getResources();
// TextView verdict;
Random rand = new Random();
final String[][] myNames = {
{"Canard", "kaczka"},
{"Chaussure", "but"},
{"Enfant", "dziecko"},
{"Voiture", "samochód"},
{"Auto", "auto"},
{"Chaussette", "skarpeta"},
{"Chien", "pies"},
{"Télévision", "telewizor"},
{"Boire", "pić"},
{"Banane", "banan"},
{"Yaourt", "jogurt"},
{"Téléphone", "telefon"},
{"Maison", "dom"},
{"Lait", "mleko"},
{"Ballon", "piłka"},
{"Nourriture", "jedzenie"},
{"Soupe", "zupa"},
{"Manger", "jeść"},
{"Cuillère", "łyzka"},
{"Petit pot", "nocnik"},
{"Faire pipi", "siku"},
{"Lundi", "poniedziałek"},
{"mardi", "wtorek"},
{"mercredi", "środa"},
{"jeudi", "czwartek"},
{"vendredi", "piątek"},
{"samedi", "sobota"},
{"dimanche", "niedziela"},
{"bonjour", "dzień dobry"},
{"frère", "brat"},
{"soeur", "siostra"},
{"fille", "córka"},
{"garçon", "chłopak"},
{"enfant", "dziecko"},
{"beau-frère", "szwagier"},
{"belle-soeur", "szwagierka"},
{"belle-mère", "teściowa"},
{"belle-fille", "synowa"},
{"gendre", "zięć"},
{"beau-fils", "pasierb"},
{"fruit", "owoce"},
{"fraise", "truskawka"},
{"orange", "pomarańcza"},
{"raisin", "winogrono"},
{"abricot", "morela"},
{"poire", "gruszka"},
{"pomme", "jabłko"},
};
// nbreQuestions = Integer.parseInt(NbQuestions.getText().toString());
for (int i = 0; i < nbreQuestions; i++) ;
index = rand.nextInt(myNames.length);
motVF = myNames[index][0];
motVP = myNames[index][1]; |
Partager