Commit 4fbbe27ac2606f16839286574a0c0d5ae7467130
1 parent
2db7566f
ajout de la fonctionnalité lire consigne dans MyPlayActivity
Showing
20 changed files
with
191 additions
and
21 deletions
Show diff stats
app/src/main/java/tonio/noa/Hygiene1Activity.java
@@ -4,9 +4,11 @@ import android.content.ClipData; | @@ -4,9 +4,11 @@ import android.content.ClipData; | ||
4 | import android.content.Intent; | 4 | import android.content.Intent; |
5 | import android.os.Build; | 5 | import android.os.Build; |
6 | import android.os.Bundle; | 6 | import android.os.Bundle; |
7 | +import android.speech.tts.TextToSpeech; | ||
7 | import android.view.DragEvent; | 8 | import android.view.DragEvent; |
8 | import android.view.MotionEvent; | 9 | import android.view.MotionEvent; |
9 | import android.view.View; | 10 | import android.view.View; |
11 | +import android.widget.TextView; | ||
10 | 12 | ||
11 | /** | 13 | /** |
12 | * Created by psyk on 31/01/18. | 14 | * Created by psyk on 31/01/18. |
@@ -24,6 +26,12 @@ public class Hygiene1Activity extends MyPlayActivity implements View.OnTouchList | @@ -24,6 +26,12 @@ public class Hygiene1Activity extends MyPlayActivity implements View.OnTouchList | ||
24 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { | 26 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { |
25 | super.onActivityResult(requestCode, resultCode, data); | 27 | super.onActivityResult(requestCode, resultCode, data); |
26 | setContentView(R.layout.hygiene1_display); | 28 | setContentView(R.layout.hygiene1_display); |
29 | + | ||
30 | + TextView txtV = findViewById(R.id.cons_hyg1); | ||
31 | + smallCons = "Met la brosse à dent dans la case correspondante."; | ||
32 | + txtV.setText(smallCons); | ||
33 | + setTts(); | ||
34 | + | ||
27 | findViewById(R.id.blue_toothbrush).setOnTouchListener(this); | 35 | findViewById(R.id.blue_toothbrush).setOnTouchListener(this); |
28 | findViewById(R.id.blue_toothbrush).setOnDragListener(this); | 36 | findViewById(R.id.blue_toothbrush).setOnDragListener(this); |
29 | findViewById(R.id.shadow_toothbrush).setOnDragListener(this); | 37 | findViewById(R.id.shadow_toothbrush).setOnDragListener(this); |
@@ -85,7 +93,6 @@ public class Hygiene1Activity extends MyPlayActivity implements View.OnTouchList | @@ -85,7 +93,6 @@ public class Hygiene1Activity extends MyPlayActivity implements View.OnTouchList | ||
85 | return true; | 93 | return true; |
86 | } | 94 | } |
87 | 95 | ||
88 | - | ||
89 | @Override | 96 | @Override |
90 | protected void next() { | 97 | protected void next() { |
91 | startActivity(new Intent(this, Hygiene2Activity.class)); | 98 | startActivity(new Intent(this, Hygiene2Activity.class)); |
app/src/main/java/tonio/noa/Hygiene2Activity.java
@@ -4,9 +4,11 @@ import android.content.ClipData; | @@ -4,9 +4,11 @@ import android.content.ClipData; | ||
4 | import android.content.Intent; | 4 | import android.content.Intent; |
5 | import android.os.Build; | 5 | import android.os.Build; |
6 | import android.os.Bundle; | 6 | import android.os.Bundle; |
7 | +import android.speech.tts.TextToSpeech; | ||
7 | import android.view.DragEvent; | 8 | import android.view.DragEvent; |
8 | import android.view.MotionEvent; | 9 | import android.view.MotionEvent; |
9 | import android.view.View; | 10 | import android.view.View; |
11 | +import android.widget.TextView; | ||
10 | 12 | ||
11 | /** | 13 | /** |
12 | * Created by psyk on 31/01/18. | 14 | * Created by psyk on 31/01/18. |
@@ -24,6 +26,12 @@ public class Hygiene2Activity extends MyPlayActivity implements View.OnTouchList | @@ -24,6 +26,12 @@ public class Hygiene2Activity extends MyPlayActivity implements View.OnTouchList | ||
24 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { | 26 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { |
25 | super.onActivityResult(requestCode, resultCode, data); | 27 | super.onActivityResult(requestCode, resultCode, data); |
26 | setContentView(R.layout.hygiene2_display); | 28 | setContentView(R.layout.hygiene2_display); |
29 | + | ||
30 | + TextView txtV = findViewById(R.id.cons_hyg2); | ||
31 | + smallCons = "Met le dessin de la brosse à dent sur sa photo."; | ||
32 | + txtV.setText(smallCons); | ||
33 | + setTts(); | ||
34 | + | ||
27 | findViewById(R.id.blue_toothbrush).setOnTouchListener(this); | 35 | findViewById(R.id.blue_toothbrush).setOnTouchListener(this); |
28 | findViewById(R.id.blue_toothbrush).setOnDragListener(this); | 36 | findViewById(R.id.blue_toothbrush).setOnDragListener(this); |
29 | findViewById(R.id.blue_toothbrush_pic).setOnDragListener(this); | 37 | findViewById(R.id.blue_toothbrush_pic).setOnDragListener(this); |
@@ -85,7 +93,6 @@ public class Hygiene2Activity extends MyPlayActivity implements View.OnTouchList | @@ -85,7 +93,6 @@ public class Hygiene2Activity extends MyPlayActivity implements View.OnTouchList | ||
85 | return true; | 93 | return true; |
86 | } | 94 | } |
87 | 95 | ||
88 | - | ||
89 | @Override | 96 | @Override |
90 | protected void next() { | 97 | protected void next() { |
91 | startActivity(new Intent(this, Hygiene3Activity.class)); | 98 | startActivity(new Intent(this, Hygiene3Activity.class)); |
app/src/main/java/tonio/noa/Hygiene3Activity.java
@@ -7,6 +7,7 @@ import android.os.Bundle; | @@ -7,6 +7,7 @@ import android.os.Bundle; | ||
7 | import android.view.DragEvent; | 7 | import android.view.DragEvent; |
8 | import android.view.MotionEvent; | 8 | import android.view.MotionEvent; |
9 | import android.view.View; | 9 | import android.view.View; |
10 | +import android.widget.TextView; | ||
10 | 11 | ||
11 | /** | 12 | /** |
12 | * Created by psyk on 31/01/18. | 13 | * Created by psyk on 31/01/18. |
@@ -24,6 +25,12 @@ public class Hygiene3Activity extends MyPlayActivity implements View.OnTouchList | @@ -24,6 +25,12 @@ public class Hygiene3Activity extends MyPlayActivity implements View.OnTouchList | ||
24 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { | 25 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { |
25 | super.onActivityResult(requestCode, resultCode, data); | 26 | super.onActivityResult(requestCode, resultCode, data); |
26 | setContentView(R.layout.hygiene3_display); | 27 | setContentView(R.layout.hygiene3_display); |
28 | + | ||
29 | + TextView txtV = findViewById(R.id.cons_hyg3); | ||
30 | + smallCons = "Met la brosse à dent bleu sur la rouge."; | ||
31 | + txtV.setText(smallCons); | ||
32 | + setTts(); | ||
33 | + | ||
27 | findViewById(R.id.blue_toothbrush).setOnTouchListener(this); | 34 | findViewById(R.id.blue_toothbrush).setOnTouchListener(this); |
28 | findViewById(R.id.blue_toothbrush).setOnDragListener(this); | 35 | findViewById(R.id.blue_toothbrush).setOnDragListener(this); |
29 | findViewById(R.id.red_toothbrush).setOnDragListener(this); | 36 | findViewById(R.id.red_toothbrush).setOnDragListener(this); |
app/src/main/java/tonio/noa/Hygiene4Activity.java
@@ -9,6 +9,7 @@ import android.view.DragEvent; | @@ -9,6 +9,7 @@ import android.view.DragEvent; | ||
9 | import android.view.MotionEvent; | 9 | import android.view.MotionEvent; |
10 | import android.view.View; | 10 | import android.view.View; |
11 | import android.widget.ImageView; | 11 | import android.widget.ImageView; |
12 | +import android.widget.TextView; | ||
12 | 13 | ||
13 | /** | 14 | /** |
14 | * Created by psyk on 24/01/18. | 15 | * Created by psyk on 24/01/18. |
@@ -30,6 +31,11 @@ public class Hygiene4Activity extends MyPlayActivity implements View.OnTouchList | @@ -30,6 +31,11 @@ public class Hygiene4Activity extends MyPlayActivity implements View.OnTouchList | ||
30 | 31 | ||
31 | setContentView(R.layout.hygiene4_display); | 32 | setContentView(R.layout.hygiene4_display); |
32 | 33 | ||
34 | + TextView txtV = findViewById(R.id.cons_hyg4); | ||
35 | + smallCons = "Met les affaires de toilettes dans la trousse de toilette."; | ||
36 | + txtV.setText(smallCons); | ||
37 | + setTts(); | ||
38 | + | ||
33 | findViewById(R.id.snail).setOnTouchListener(this); | 39 | findViewById(R.id.snail).setOnTouchListener(this); |
34 | findViewById(R.id.towel).setOnTouchListener(this); | 40 | findViewById(R.id.towel).setOnTouchListener(this); |
35 | findViewById(R.id.elephant).setOnTouchListener(this); | 41 | findViewById(R.id.elephant).setOnTouchListener(this); |
app/src/main/java/tonio/noa/MyPlayActivity.java
@@ -2,11 +2,12 @@ package tonio.noa; | @@ -2,11 +2,12 @@ package tonio.noa; | ||
2 | 2 | ||
3 | import android.app.Activity; | 3 | import android.app.Activity; |
4 | import android.content.Intent; | 4 | import android.content.Intent; |
5 | -import android.os.Bundle; | ||
6 | import android.speech.tts.TextToSpeech; | 5 | import android.speech.tts.TextToSpeech; |
7 | import android.view.View; | 6 | import android.view.View; |
8 | import android.widget.Toast; | 7 | import android.widget.Toast; |
9 | 8 | ||
9 | +import java.util.Locale; | ||
10 | + | ||
10 | 11 | ||
11 | /** | 12 | /** |
12 | * Created by psyk on 09/01/18. | 13 | * Created by psyk on 09/01/18. |
@@ -16,9 +17,14 @@ public abstract class MyPlayActivity extends Activity { | @@ -16,9 +17,14 @@ public abstract class MyPlayActivity extends Activity { | ||
16 | 17 | ||
17 | public static final int REQUEST_CODE = 1; | 18 | public static final int REQUEST_CODE = 1; |
18 | protected TextToSpeech tts; | 19 | protected TextToSpeech tts; |
20 | + protected String smallCons; | ||
19 | 21 | ||
20 | protected abstract void next(); | 22 | protected abstract void next(); |
21 | 23 | ||
24 | + protected void enonceConsigne(View view) { | ||
25 | + tts.speak(smallCons, TextToSpeech.QUEUE_FLUSH, null, null); | ||
26 | + } | ||
27 | + | ||
22 | protected void bravoPage(View view) { | 28 | protected void bravoPage(View view) { |
23 | startActivityForResult(new Intent(this, BravoActivity.class), REQUEST_CODE); | 29 | startActivityForResult(new Intent(this, BravoActivity.class), REQUEST_CODE); |
24 | } | 30 | } |
@@ -30,6 +36,18 @@ public abstract class MyPlayActivity extends Activity { | @@ -30,6 +36,18 @@ public abstract class MyPlayActivity extends Activity { | ||
30 | startActivityForResult(i, requestCode); | 36 | startActivityForResult(i, requestCode); |
31 | } | 37 | } |
32 | 38 | ||
39 | + protected void setTts() { | ||
40 | + | ||
41 | + tts = new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() { | ||
42 | + @Override | ||
43 | + public void onInit(int status) { | ||
44 | + if (status != TextToSpeech.ERROR) { | ||
45 | + tts.setLanguage(Locale.FRENCH); | ||
46 | + } | ||
47 | + } | ||
48 | + }); | ||
49 | + } | ||
50 | + | ||
33 | @Override | 51 | @Override |
34 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { | 52 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { |
35 | try { | 53 | try { |
@@ -45,7 +63,16 @@ public abstract class MyPlayActivity extends Activity { | @@ -45,7 +63,16 @@ public abstract class MyPlayActivity extends Activity { | ||
45 | } | 63 | } |
46 | } | 64 | } |
47 | 65 | ||
48 | - public void backHome(View view) { | 66 | + @Override |
67 | + public void onDestroy() { | ||
68 | + if (tts != null) { | ||
69 | + tts.stop(); | ||
70 | + tts.shutdown(); | ||
71 | + } | ||
72 | + super.onDestroy(); | ||
73 | + } | ||
74 | + | ||
75 | + protected void backHome(View view) { | ||
49 | 76 | ||
50 | startActivity(new Intent(this, MainActivity.class)); | 77 | startActivity(new Intent(this, MainActivity.class)); |
51 | finish(); | 78 | finish(); |
app/src/main/java/tonio/noa/TutorialScene1Activity.java
@@ -2,6 +2,9 @@ package tonio.noa; | @@ -2,6 +2,9 @@ package tonio.noa; | ||
2 | 2 | ||
3 | import android.content.Intent; | 3 | import android.content.Intent; |
4 | import android.os.Bundle; | 4 | import android.os.Bundle; |
5 | +import android.speech.tts.TextToSpeech; | ||
6 | +import android.view.View; | ||
7 | +import android.widget.TextView; | ||
5 | 8 | ||
6 | /** | 9 | /** |
7 | * Created by tonio on 22/11/17. | 10 | * Created by tonio on 22/11/17. |
@@ -19,11 +22,15 @@ public class TutorialScene1Activity extends MyPlayActivity { | @@ -19,11 +22,15 @@ public class TutorialScene1Activity extends MyPlayActivity { | ||
19 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { | 22 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { |
20 | super.onActivityResult(requestCode, resultCode, data); | 23 | super.onActivityResult(requestCode, resultCode, data); |
21 | setContentView(R.layout.tutorial1_display); | 24 | setContentView(R.layout.tutorial1_display); |
22 | - // do your stuff here after SecondActivity finished. | 25 | + TextView txtV = findViewById(R.id.cons_tut1); |
26 | + smallCons = "Touche le ballon de foot."; | ||
27 | + txtV.setText(smallCons); | ||
28 | + setTts(); | ||
23 | } | 29 | } |
24 | 30 | ||
25 | @Override | 31 | @Override |
26 | protected void next() { | 32 | protected void next() { |
27 | startActivity(new Intent(this, TutorialScene2Activity.class)); | 33 | startActivity(new Intent(this, TutorialScene2Activity.class)); |
28 | } | 34 | } |
35 | + | ||
29 | } | 36 | } |
30 | \ No newline at end of file | 37 | \ No newline at end of file |
app/src/main/java/tonio/noa/TutorialScene2Activity.java
@@ -4,10 +4,12 @@ import android.content.ClipData; | @@ -4,10 +4,12 @@ import android.content.ClipData; | ||
4 | import android.content.Intent; | 4 | import android.content.Intent; |
5 | import android.os.Build; | 5 | import android.os.Build; |
6 | import android.os.Bundle; | 6 | import android.os.Bundle; |
7 | +import android.speech.tts.TextToSpeech; | ||
7 | import android.view.DragEvent; | 8 | import android.view.DragEvent; |
8 | import android.view.MotionEvent; | 9 | import android.view.MotionEvent; |
9 | import android.view.View; | 10 | import android.view.View; |
10 | import android.widget.ImageView; | 11 | import android.widget.ImageView; |
12 | +import android.widget.TextView; | ||
11 | 13 | ||
12 | /** | 14 | /** |
13 | * Created by psyk on 09/01/18. | 15 | * Created by psyk on 09/01/18. |
@@ -28,7 +30,10 @@ public class TutorialScene2Activity extends MyPlayActivity implements View.OnTou | @@ -28,7 +30,10 @@ public class TutorialScene2Activity extends MyPlayActivity implements View.OnTou | ||
28 | findViewById(R.id.blue_rectangle).setOnTouchListener(this); | 30 | findViewById(R.id.blue_rectangle).setOnTouchListener(this); |
29 | findViewById(R.id.blue_rectangle).setOnDragListener(this); | 31 | findViewById(R.id.blue_rectangle).setOnDragListener(this); |
30 | findViewById(R.id.red_rectangle).setOnDragListener(this); | 32 | findViewById(R.id.red_rectangle).setOnDragListener(this); |
31 | - // do your stuff here after SecondActivity finished. | 33 | + TextView txtV = findViewById(R.id.cons_tut2); |
34 | + smallCons = "Fais glisser le rectangle bleu sur le rectangle rouge."; | ||
35 | + txtV.setText(smallCons); | ||
36 | + setTts(); | ||
32 | } | 37 | } |
33 | 38 | ||
34 | 39 | ||
@@ -96,4 +101,5 @@ public class TutorialScene2Activity extends MyPlayActivity implements View.OnTou | @@ -96,4 +101,5 @@ public class TutorialScene2Activity extends MyPlayActivity implements View.OnTou | ||
96 | startActivity(new Intent(this, TutorialScene3Activity.class)); | 101 | startActivity(new Intent(this, TutorialScene3Activity.class)); |
97 | } | 102 | } |
98 | 103 | ||
104 | + | ||
99 | } | 105 | } |
app/src/main/java/tonio/noa/TutorialScene3Activity.java
@@ -4,10 +4,12 @@ import android.content.ClipData; | @@ -4,10 +4,12 @@ import android.content.ClipData; | ||
4 | import android.content.Intent; | 4 | import android.content.Intent; |
5 | import android.os.Build; | 5 | import android.os.Build; |
6 | import android.os.Bundle; | 6 | import android.os.Bundle; |
7 | +import android.speech.tts.TextToSpeech; | ||
7 | import android.view.DragEvent; | 8 | import android.view.DragEvent; |
8 | import android.view.MotionEvent; | 9 | import android.view.MotionEvent; |
9 | import android.view.View; | 10 | import android.view.View; |
10 | import android.widget.ImageView; | 11 | import android.widget.ImageView; |
12 | +import android.widget.TextView; | ||
11 | 13 | ||
12 | /** | 14 | /** |
13 | * Created by psyk on 15/01/18. | 15 | * Created by psyk on 15/01/18. |
@@ -29,6 +31,11 @@ public class TutorialScene3Activity extends MyPlayActivity implements View.OnTou | @@ -29,6 +31,11 @@ public class TutorialScene3Activity extends MyPlayActivity implements View.OnTou | ||
29 | 31 | ||
30 | setContentView(R.layout.tutorial3_display); | 32 | setContentView(R.layout.tutorial3_display); |
31 | 33 | ||
34 | + TextView txtV = findViewById(R.id.cons_tut3); | ||
35 | + smallCons = "Associe les carrés de même couleur."; | ||
36 | + txtV.setText(smallCons); | ||
37 | + setTts(); | ||
38 | + | ||
32 | findViewById(R.id.blue_rectangle31).setOnTouchListener(this); | 39 | findViewById(R.id.blue_rectangle31).setOnTouchListener(this); |
33 | findViewById(R.id.blue_rectangle32).setOnTouchListener(this); | 40 | findViewById(R.id.blue_rectangle32).setOnTouchListener(this); |
34 | findViewById(R.id.red_rectangle31).setOnTouchListener(this); | 41 | findViewById(R.id.red_rectangle31).setOnTouchListener(this); |
app/src/main/java/tonio/noa/TutorialScene4Activity.java
@@ -4,9 +4,11 @@ import android.content.ClipData; | @@ -4,9 +4,11 @@ import android.content.ClipData; | ||
4 | import android.content.Intent; | 4 | import android.content.Intent; |
5 | import android.os.Build; | 5 | import android.os.Build; |
6 | import android.os.Bundle; | 6 | import android.os.Bundle; |
7 | +import android.speech.tts.TextToSpeech; | ||
7 | import android.view.DragEvent; | 8 | import android.view.DragEvent; |
8 | import android.view.MotionEvent; | 9 | import android.view.MotionEvent; |
9 | import android.view.View; | 10 | import android.view.View; |
11 | +import android.widget.TextView; | ||
10 | 12 | ||
11 | /** | 13 | /** |
12 | * Created by psyk on 24/01/18. | 14 | * Created by psyk on 24/01/18. |
@@ -28,6 +30,12 @@ public class TutorialScene4Activity extends MyPlayActivity implements View.OnTou | @@ -28,6 +30,12 @@ public class TutorialScene4Activity extends MyPlayActivity implements View.OnTou | ||
28 | 30 | ||
29 | setContentView(R.layout.tutorial4_display); | 31 | setContentView(R.layout.tutorial4_display); |
30 | 32 | ||
33 | + TextView txtV = findViewById(R.id.cons_tut4); | ||
34 | + smallCons = "Met les carrés dans les cases correspondantes."; | ||
35 | + txtV.setText(smallCons); | ||
36 | + setTts(); | ||
37 | + | ||
38 | + | ||
31 | findViewById(R.id.blue_rectangle41).setOnTouchListener(this); | 39 | findViewById(R.id.blue_rectangle41).setOnTouchListener(this); |
32 | findViewById(R.id.blue_rectangle42).setOnTouchListener(this); | 40 | findViewById(R.id.blue_rectangle42).setOnTouchListener(this); |
33 | findViewById(R.id.blue_rectangle43).setOnTouchListener(this); | 41 | findViewById(R.id.blue_rectangle43).setOnTouchListener(this); |
app/src/main/java/tonio/noa/TutorialScene5Activity.java
@@ -2,8 +2,10 @@ package tonio.noa; | @@ -2,8 +2,10 @@ package tonio.noa; | ||
2 | 2 | ||
3 | import android.content.Intent; | 3 | import android.content.Intent; |
4 | import android.os.Bundle; | 4 | import android.os.Bundle; |
5 | +import android.speech.tts.TextToSpeech; | ||
5 | import android.view.MotionEvent; | 6 | import android.view.MotionEvent; |
6 | import android.view.View; | 7 | import android.view.View; |
8 | +import android.widget.TextView; | ||
7 | 9 | ||
8 | /** | 10 | /** |
9 | * Created by psyk on 24/01/18. | 11 | * Created by psyk on 24/01/18. |
@@ -25,6 +27,12 @@ public class TutorialScene5Activity extends MyPlayActivity implements View.OnTou | @@ -25,6 +27,12 @@ public class TutorialScene5Activity extends MyPlayActivity implements View.OnTou | ||
25 | 27 | ||
26 | setContentView(R.layout.tutorial5_display); | 28 | setContentView(R.layout.tutorial5_display); |
27 | 29 | ||
30 | + TextView txtV = findViewById(R.id.cons_tut5); | ||
31 | + smallCons = "Clique sur les carrés verts."; | ||
32 | + txtV.setText(smallCons); | ||
33 | + setTts(); | ||
34 | + | ||
35 | + | ||
28 | findViewById(R.id.blue_rectangle51).setOnTouchListener(this); | 36 | findViewById(R.id.blue_rectangle51).setOnTouchListener(this); |
29 | findViewById(R.id.blue_rectangle52).setOnTouchListener(this); | 37 | findViewById(R.id.blue_rectangle52).setOnTouchListener(this); |
30 | findViewById(R.id.blue_rectangle53).setOnTouchListener(this); | 38 | findViewById(R.id.blue_rectangle53).setOnTouchListener(this); |
app/src/main/res/layout/hygiene1_display.xml
@@ -6,13 +6,13 @@ | @@ -6,13 +6,13 @@ | ||
6 | android:orientation="vertical"> | 6 | android:orientation="vertical"> |
7 | 7 | ||
8 | <TextView | 8 | <TextView |
9 | + android:id="@+id/cons_hyg1" | ||
9 | android:layout_width="wrap_content" | 10 | android:layout_width="wrap_content" |
10 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
11 | android:layout_alignParentBottom="true" | 12 | android:layout_alignParentBottom="true" |
12 | android:layout_centerHorizontal="true" | 13 | android:layout_centerHorizontal="true" |
13 | android:layout_margin="20dp" | 14 | android:layout_margin="20dp" |
14 | android:maxWidth="500dp" | 15 | android:maxWidth="500dp" |
15 | - android:text="Met la brosse à dent dans la case correspondante." | ||
16 | android:textAppearance="@style/TextFont" /> | 16 | android:textAppearance="@style/TextFont" /> |
17 | 17 | ||
18 | <ImageView | 18 | <ImageView |
@@ -48,4 +48,13 @@ | @@ -48,4 +48,13 @@ | ||
48 | android:onClick="backHome" | 48 | android:onClick="backHome" |
49 | android:text="@string/home" /> | 49 | android:text="@string/home" /> |
50 | 50 | ||
51 | + <Button | ||
52 | + android:id="@+id/announce_instruction" | ||
53 | + android:layout_width="wrap_content" | ||
54 | + android:layout_height="wrap_content" | ||
55 | + android:layout_alignParentBottom="true" | ||
56 | + android:layout_alignParentEnd="true" | ||
57 | + android:layout_margin="20dp" | ||
58 | + android:onClick="enonceConsigne" | ||
59 | + android:text="@string/instruction" /> | ||
51 | </RelativeLayout> | 60 | </RelativeLayout> |
52 | \ No newline at end of file | 61 | \ No newline at end of file |
app/src/main/res/layout/hygiene2_display.xml
@@ -6,13 +6,13 @@ | @@ -6,13 +6,13 @@ | ||
6 | android:orientation="vertical"> | 6 | android:orientation="vertical"> |
7 | 7 | ||
8 | <TextView | 8 | <TextView |
9 | + android:id="@+id/cons_hyg2" | ||
9 | android:layout_width="wrap_content" | 10 | android:layout_width="wrap_content" |
10 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
11 | android:layout_alignParentBottom="true" | 12 | android:layout_alignParentBottom="true" |
12 | android:layout_centerHorizontal="true" | 13 | android:layout_centerHorizontal="true" |
13 | android:layout_margin="20dp" | 14 | android:layout_margin="20dp" |
14 | android:maxWidth="500dp" | 15 | android:maxWidth="500dp" |
15 | - android:text="Met le dessin de la brosse à dent sur sa photo." | ||
16 | android:textAppearance="@style/TextFont" /> | 16 | android:textAppearance="@style/TextFont" /> |
17 | 17 | ||
18 | <ImageView | 18 | <ImageView |
@@ -47,4 +47,13 @@ | @@ -47,4 +47,13 @@ | ||
47 | android:onClick="backHome" | 47 | android:onClick="backHome" |
48 | android:text="@string/home" /> | 48 | android:text="@string/home" /> |
49 | 49 | ||
50 | + <Button | ||
51 | + android:id="@+id/announce_instruction" | ||
52 | + android:layout_width="wrap_content" | ||
53 | + android:layout_height="wrap_content" | ||
54 | + android:layout_alignParentBottom="true" | ||
55 | + android:layout_alignParentEnd="true" | ||
56 | + android:layout_margin="20dp" | ||
57 | + android:onClick="enonceConsigne" | ||
58 | + android:text="@string/instruction" /> | ||
50 | </RelativeLayout> | 59 | </RelativeLayout> |
51 | \ No newline at end of file | 60 | \ No newline at end of file |
app/src/main/res/layout/hygiene3_display.xml
@@ -6,13 +6,13 @@ | @@ -6,13 +6,13 @@ | ||
6 | android:orientation="vertical"> | 6 | android:orientation="vertical"> |
7 | 7 | ||
8 | <TextView | 8 | <TextView |
9 | + android:id="@+id/cons_hyg3" | ||
9 | android:layout_width="wrap_content" | 10 | android:layout_width="wrap_content" |
10 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
11 | android:layout_alignParentBottom="true" | 12 | android:layout_alignParentBottom="true" |
12 | android:layout_centerHorizontal="true" | 13 | android:layout_centerHorizontal="true" |
13 | android:layout_margin="20dp" | 14 | android:layout_margin="20dp" |
14 | android:maxWidth="500dp" | 15 | android:maxWidth="500dp" |
15 | - android:text="Met la brosse à dent bleu sur la rouge." | ||
16 | android:textAppearance="@style/TextFont" /> | 16 | android:textAppearance="@style/TextFont" /> |
17 | 17 | ||
18 | <ImageView | 18 | <ImageView |
@@ -47,4 +47,13 @@ | @@ -47,4 +47,13 @@ | ||
47 | android:onClick="backHome" | 47 | android:onClick="backHome" |
48 | android:text="@string/home" /> | 48 | android:text="@string/home" /> |
49 | 49 | ||
50 | + <Button | ||
51 | + android:id="@+id/announce_instruction" | ||
52 | + android:layout_width="wrap_content" | ||
53 | + android:layout_height="wrap_content" | ||
54 | + android:layout_alignParentBottom="true" | ||
55 | + android:layout_alignParentEnd="true" | ||
56 | + android:layout_margin="20dp" | ||
57 | + android:onClick="enonceConsigne" | ||
58 | + android:text="@string/instruction" /> | ||
50 | </RelativeLayout> | 59 | </RelativeLayout> |
51 | \ No newline at end of file | 60 | \ No newline at end of file |
app/src/main/res/layout/hygiene4_display.xml
@@ -115,13 +115,12 @@ | @@ -115,13 +115,12 @@ | ||
115 | android:src="@drawable/trumpet" /> | 115 | android:src="@drawable/trumpet" /> |
116 | 116 | ||
117 | <TextView | 117 | <TextView |
118 | - android:id="@+id/text4" | 118 | + android:id="@+id/cons_hyg4" |
119 | android:layout_width="wrap_content" | 119 | android:layout_width="wrap_content" |
120 | android:layout_height="wrap_content" | 120 | android:layout_height="wrap_content" |
121 | android:layout_alignParentBottom="true" | 121 | android:layout_alignParentBottom="true" |
122 | android:layout_centerHorizontal="true" | 122 | android:layout_centerHorizontal="true" |
123 | android:layout_margin="20dp" | 123 | android:layout_margin="20dp" |
124 | - android:text="Met les carrés dans les cases correspondantes." | ||
125 | android:textAppearance="@style/TextFont" /> | 124 | android:textAppearance="@style/TextFont" /> |
126 | 125 | ||
127 | 126 | ||
@@ -135,4 +134,13 @@ | @@ -135,4 +134,13 @@ | ||
135 | android:onClick="backHome" | 134 | android:onClick="backHome" |
136 | android:text="@string/home" /> | 135 | android:text="@string/home" /> |
137 | 136 | ||
137 | + <Button | ||
138 | + android:id="@+id/announce_instruction" | ||
139 | + android:layout_width="wrap_content" | ||
140 | + android:layout_height="wrap_content" | ||
141 | + android:layout_alignParentBottom="true" | ||
142 | + android:layout_alignParentEnd="true" | ||
143 | + android:layout_margin="20dp" | ||
144 | + android:onClick="enonceConsigne" | ||
145 | + android:text="@string/instruction" /> | ||
138 | </RelativeLayout> | 146 | </RelativeLayout> |
139 | \ No newline at end of file | 147 | \ No newline at end of file |
app/src/main/res/layout/tutorial1_display.xml
@@ -5,12 +5,12 @@ | @@ -5,12 +5,12 @@ | ||
5 | android:orientation="vertical"> | 5 | android:orientation="vertical"> |
6 | 6 | ||
7 | <TextView | 7 | <TextView |
8 | + android:id="@+id/cons_tut1" | ||
8 | android:layout_width="wrap_content" | 9 | android:layout_width="wrap_content" |
9 | android:layout_height="wrap_content" | 10 | android:layout_height="wrap_content" |
10 | android:layout_alignParentBottom="true" | 11 | android:layout_alignParentBottom="true" |
11 | - android:layout_margin="20dp" | ||
12 | android:layout_centerHorizontal="true" | 12 | android:layout_centerHorizontal="true" |
13 | - android:text="Touche le ballon de foot." | 13 | + android:layout_margin="20dp" |
14 | android:textAppearance="@style/TextFont" /> | 14 | android:textAppearance="@style/TextFont" /> |
15 | 15 | ||
16 | <ImageButton | 16 | <ImageButton |
@@ -31,4 +31,14 @@ | @@ -31,4 +31,14 @@ | ||
31 | android:onClick="backHome" | 31 | android:onClick="backHome" |
32 | android:text="@string/home" /> | 32 | android:text="@string/home" /> |
33 | 33 | ||
34 | + <Button | ||
35 | + android:id="@+id/announce_instruction" | ||
36 | + android:layout_width="wrap_content" | ||
37 | + android:layout_height="wrap_content" | ||
38 | + android:layout_alignParentBottom="true" | ||
39 | + android:layout_alignParentEnd="true" | ||
40 | + android:layout_margin="20dp" | ||
41 | + android:onClick="enonceConsigne" | ||
42 | + android:text="@string/instruction" /> | ||
43 | + | ||
34 | </RelativeLayout> | 44 | </RelativeLayout> |
35 | \ No newline at end of file | 45 | \ No newline at end of file |
app/src/main/res/layout/tutorial2_display.xml
@@ -6,13 +6,13 @@ | @@ -6,13 +6,13 @@ | ||
6 | android:orientation="vertical"> | 6 | android:orientation="vertical"> |
7 | 7 | ||
8 | <TextView | 8 | <TextView |
9 | + android:id="@+id/cons_tut2" | ||
9 | android:layout_width="wrap_content" | 10 | android:layout_width="wrap_content" |
10 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
11 | android:layout_alignParentBottom="true" | 12 | android:layout_alignParentBottom="true" |
12 | android:layout_centerHorizontal="true" | 13 | android:layout_centerHorizontal="true" |
13 | android:maxWidth="500dp" | 14 | android:maxWidth="500dp" |
14 | android:layout_margin="20dp" | 15 | android:layout_margin="20dp" |
15 | - android:text="Fais glisser le rectangle bleu sur le rectangle rouge." | ||
16 | android:textAppearance="@style/TextFont" /> | 16 | android:textAppearance="@style/TextFont" /> |
17 | 17 | ||
18 | <ImageView | 18 | <ImageView |
@@ -44,4 +44,14 @@ | @@ -44,4 +44,14 @@ | ||
44 | android:onClick="backHome" | 44 | android:onClick="backHome" |
45 | android:text="@string/home" /> | 45 | android:text="@string/home" /> |
46 | 46 | ||
47 | + <Button | ||
48 | + android:id="@+id/announce_instruction" | ||
49 | + android:layout_width="wrap_content" | ||
50 | + android:layout_height="wrap_content" | ||
51 | + android:layout_alignParentBottom="true" | ||
52 | + android:layout_alignParentEnd="true" | ||
53 | + android:layout_margin="20dp" | ||
54 | + android:onClick="enonceConsigne" | ||
55 | + android:text="@string/instruction" /> | ||
56 | + | ||
47 | </RelativeLayout> | 57 | </RelativeLayout> |
48 | \ No newline at end of file | 58 | \ No newline at end of file |
app/src/main/res/layout/tutorial3_display.xml
@@ -6,13 +6,12 @@ | @@ -6,13 +6,12 @@ | ||
6 | android:orientation="vertical"> | 6 | android:orientation="vertical"> |
7 | 7 | ||
8 | <TextView | 8 | <TextView |
9 | - android:id="@+id/text3" | 9 | + android:id="@+id/cons_tut3" |
10 | android:layout_width="wrap_content" | 10 | android:layout_width="wrap_content" |
11 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
12 | - android:layout_centerHorizontal="true" | ||
13 | android:layout_alignParentBottom="true" | 12 | android:layout_alignParentBottom="true" |
13 | + android:layout_centerHorizontal="true" | ||
14 | android:layout_margin="20dp" | 14 | android:layout_margin="20dp" |
15 | - android:text="Associe les carrés de même couleur." | ||
16 | android:textAppearance="@style/TextFont" /> | 15 | android:textAppearance="@style/TextFont" /> |
17 | 16 | ||
18 | <ImageView | 17 | <ImageView |
@@ -82,4 +81,13 @@ | @@ -82,4 +81,13 @@ | ||
82 | android:onClick="backHome" | 81 | android:onClick="backHome" |
83 | android:text="@string/home" /> | 82 | android:text="@string/home" /> |
84 | 83 | ||
84 | + <Button | ||
85 | + android:id="@+id/announce_instruction" | ||
86 | + android:layout_width="wrap_content" | ||
87 | + android:layout_height="wrap_content" | ||
88 | + android:layout_alignParentBottom="true" | ||
89 | + android:layout_alignParentEnd="true" | ||
90 | + android:layout_margin="20dp" | ||
91 | + android:onClick="enonceConsigne" | ||
92 | + android:text="@string/instruction" /> | ||
85 | </RelativeLayout> | 93 | </RelativeLayout> |
86 | \ No newline at end of file | 94 | \ No newline at end of file |
app/src/main/res/layout/tutorial4_display.xml
@@ -151,13 +151,12 @@ | @@ -151,13 +151,12 @@ | ||
151 | android:background="@drawable/blue_rectangle" /> | 151 | android:background="@drawable/blue_rectangle" /> |
152 | 152 | ||
153 | <TextView | 153 | <TextView |
154 | - android:id="@+id/text4" | 154 | + android:id="@+id/cons_tut4" |
155 | android:layout_width="wrap_content" | 155 | android:layout_width="wrap_content" |
156 | android:layout_height="wrap_content" | 156 | android:layout_height="wrap_content" |
157 | android:layout_alignParentBottom="true" | 157 | android:layout_alignParentBottom="true" |
158 | android:layout_centerHorizontal="true" | 158 | android:layout_centerHorizontal="true" |
159 | android:layout_margin="20dp" | 159 | android:layout_margin="20dp" |
160 | - android:text="Met les carrés dans les cases correspondantes." | ||
161 | android:textAppearance="@style/TextFont" /> | 160 | android:textAppearance="@style/TextFont" /> |
162 | 161 | ||
163 | 162 | ||
@@ -171,4 +170,13 @@ | @@ -171,4 +170,13 @@ | ||
171 | android:onClick="backHome" | 170 | android:onClick="backHome" |
172 | android:text="@string/home" /> | 171 | android:text="@string/home" /> |
173 | 172 | ||
173 | + <Button | ||
174 | + android:id="@+id/announce_instruction" | ||
175 | + android:layout_width="wrap_content" | ||
176 | + android:layout_height="wrap_content" | ||
177 | + android:layout_alignParentBottom="true" | ||
178 | + android:layout_alignParentEnd="true" | ||
179 | + android:layout_margin="20dp" | ||
180 | + android:onClick="enonceConsigne" | ||
181 | + android:text="@string/instruction" /> | ||
174 | </RelativeLayout> | 182 | </RelativeLayout> |
175 | \ No newline at end of file | 183 | \ No newline at end of file |
app/src/main/res/layout/tutorial5_display.xml
@@ -113,13 +113,12 @@ | @@ -113,13 +113,12 @@ | ||
113 | android:background="@drawable/blue_rectangle" /> | 113 | android:background="@drawable/blue_rectangle" /> |
114 | 114 | ||
115 | <TextView | 115 | <TextView |
116 | - android:id="@+id/text4" | 116 | + android:id="@+id/cons_tut5" |
117 | android:layout_width="wrap_content" | 117 | android:layout_width="wrap_content" |
118 | android:layout_height="wrap_content" | 118 | android:layout_height="wrap_content" |
119 | android:layout_alignParentBottom="true" | 119 | android:layout_alignParentBottom="true" |
120 | android:layout_centerHorizontal="true" | 120 | android:layout_centerHorizontal="true" |
121 | android:layout_margin="20dp" | 121 | android:layout_margin="20dp" |
122 | - android:text="Clique sur les carrés verts." | ||
123 | android:textAppearance="@style/TextFont" /> | 122 | android:textAppearance="@style/TextFont" /> |
124 | 123 | ||
125 | 124 | ||
@@ -133,4 +132,13 @@ | @@ -133,4 +132,13 @@ | ||
133 | android:onClick="backHome" | 132 | android:onClick="backHome" |
134 | android:text="@string/home" /> | 133 | android:text="@string/home" /> |
135 | 134 | ||
135 | + <Button | ||
136 | + android:id="@+id/announce_instruction" | ||
137 | + android:layout_width="wrap_content" | ||
138 | + android:layout_height="wrap_content" | ||
139 | + android:layout_alignParentBottom="true" | ||
140 | + android:layout_alignParentEnd="true" | ||
141 | + android:layout_margin="20dp" | ||
142 | + android:onClick="enonceConsigne" | ||
143 | + android:text="@string/instruction" /> | ||
136 | </RelativeLayout> | 144 | </RelativeLayout> |
137 | \ No newline at end of file | 145 | \ No newline at end of file |
app/src/main/res/values/strings.xml
@@ -13,4 +13,5 @@ | @@ -13,4 +13,5 @@ | ||
13 | <string name="home">Menu</string> | 13 | <string name="home">Menu</string> |
14 | <string name="theme">Thème</string> | 14 | <string name="theme">Thème</string> |
15 | <string name="bravotxt">Bravo ! Tu as réussi la mission. Clique sur l\'écran pour continuer à jouer.</string> | 15 | <string name="bravotxt">Bravo ! Tu as réussi la mission. Clique sur l\'écran pour continuer à jouer.</string> |
16 | + <string name="instruction">Lire consigne</string> | ||
16 | </resources> | 17 | </resources> |