diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 53b6de6..f58ebd2 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -145,6 +145,14 @@
+
+
+
+
diff --git a/app/src/main/java/tonio/noa/Food1Activity.java b/app/src/main/java/tonio/noa/Food1Activity.java
index faf8ced..c9974b9 100644
--- a/app/src/main/java/tonio/noa/Food1Activity.java
+++ b/app/src/main/java/tonio/noa/Food1Activity.java
@@ -129,6 +129,5 @@ public class Food1Activity extends MyPlayActivity implements View.OnTouchListene
@Override
protected void next() {
- //startActivity(new Intent(this, TutorialScene5Activity.class));
}
}
diff --git a/app/src/main/java/tonio/noa/Security1Activity.java b/app/src/main/java/tonio/noa/Security1Activity.java
new file mode 100644
index 0000000..f1cf376
--- /dev/null
+++ b/app/src/main/java/tonio/noa/Security1Activity.java
@@ -0,0 +1,76 @@
+package tonio.noa;
+
+import android.content.Intent;
+import android.graphics.Color;
+import android.os.Bundle;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+/**
+ * Created by psyk on 24/01/18.
+ */
+
+public class Security1Activity extends MyPlayActivity implements View.OnTouchListener {
+
+ private int win_counter = 0;
+ private boolean done = false;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ lanceConsigne("Montre moi les objets qui peuvent être dangereux.");
+ }
+
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+
+ setContentView(R.layout.security1_display);
+
+ TextView txtV = findViewById(R.id.cons_sec1);
+ smallCons = "Touche les objets dangereux.";
+ txtV.setText(smallCons);
+ setTts();
+
+
+ findViewById(R.id.water).setOnTouchListener(this);
+ findViewById(R.id.knife).setOnTouchListener(this);
+ findViewById(R.id.bear).setOnTouchListener(this);
+ findViewById(R.id.pan).setOnTouchListener(this);
+ findViewById(R.id.pen).setOnTouchListener(this);
+ findViewById(R.id.bleach).setOnTouchListener(this);
+ findViewById(R.id.drugs).setOnTouchListener(this);
+ findViewById(R.id.iron).setOnTouchListener(this);
+
+ }
+
+ @Override
+ public boolean onTouch(View view, MotionEvent event) {
+ if (event.getAction() == MotionEvent.ACTION_DOWN) {
+ if (view == findViewById(R.id.iron)
+ || view == findViewById(R.id.knife)
+ || view == findViewById(R.id.pan)
+ || view == findViewById(R.id.bleach)
+ || view == findViewById(R.id.drugs)) {
+ view.setVisibility(View.INVISIBLE);
+ win_counter++;
+ } else {
+ ((ImageView) view).setColorFilter(Color.GRAY);
+ view.setEnabled(false);
+ }
+ return true;
+ }
+ if (win_counter == 5 && !done) {
+ done = true;
+ this.bravoPage(null);
+ return true;
+ } else
+ return false;
+ }
+
+ @Override
+ protected void next() {
+ this.backHome(null);
+ }
+}
diff --git a/app/src/main/java/tonio/noa/ThemeActivity.java b/app/src/main/java/tonio/noa/ThemeActivity.java
index 66dd002..cbc3f57 100644
--- a/app/src/main/java/tonio/noa/ThemeActivity.java
+++ b/app/src/main/java/tonio/noa/ThemeActivity.java
@@ -62,6 +62,11 @@ public class ThemeActivity extends Activity implements View.OnLongClickListener
startActivity(new Intent(this, Food1Activity.class));
}
+ public void securityPage(View view) {
+
+ startActivity(new Intent(this, Security1Activity.class));
+ }
+
public void backHome(View view) {
startActivity(new Intent(this, MainActivity.class));
diff --git a/app/src/main/res/drawable/app_menu.png b/app/src/main/res/drawable/app_menu.png
new file mode 100644
index 0000000..93900bc
Binary files /dev/null and b/app/src/main/res/drawable/app_menu.png differ
diff --git a/app/src/main/res/drawable/bear.png b/app/src/main/res/drawable/bear.png
new file mode 100644
index 0000000..a9bb80c
Binary files /dev/null and b/app/src/main/res/drawable/bear.png differ
diff --git a/app/src/main/res/drawable/bleach.png b/app/src/main/res/drawable/bleach.png
new file mode 100644
index 0000000..cb5a599
Binary files /dev/null and b/app/src/main/res/drawable/bleach.png differ
diff --git a/app/src/main/res/drawable/drugs.png b/app/src/main/res/drawable/drugs.png
new file mode 100644
index 0000000..7b952aa
Binary files /dev/null and b/app/src/main/res/drawable/drugs.png differ
diff --git a/app/src/main/res/drawable/iron.png b/app/src/main/res/drawable/iron.png
new file mode 100644
index 0000000..e8dc333
Binary files /dev/null and b/app/src/main/res/drawable/iron.png differ
diff --git a/app/src/main/res/drawable/knife.png b/app/src/main/res/drawable/knife.png
new file mode 100644
index 0000000..a19b4d2
Binary files /dev/null and b/app/src/main/res/drawable/knife.png differ
diff --git a/app/src/main/res/drawable/pan.png b/app/src/main/res/drawable/pan.png
new file mode 100644
index 0000000..035c1bd
Binary files /dev/null and b/app/src/main/res/drawable/pan.png differ
diff --git a/app/src/main/res/drawable/pen.png b/app/src/main/res/drawable/pen.png
new file mode 100644
index 0000000..196ec54
Binary files /dev/null and b/app/src/main/res/drawable/pen.png differ
diff --git a/app/src/main/res/drawable/speech_icon.png b/app/src/main/res/drawable/speech_icon.png
new file mode 100644
index 0000000..bad23a6
Binary files /dev/null and b/app/src/main/res/drawable/speech_icon.png differ
diff --git a/app/src/main/res/drawable/water.png b/app/src/main/res/drawable/water.png
new file mode 100644
index 0000000..58e5884
Binary files /dev/null and b/app/src/main/res/drawable/water.png differ
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index d889cf0..6c91e7a 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -20,9 +20,9 @@
android:layout_marginStart="130dp"
android:layout_marginTop="160dp"
android:onClick="themePage"
- android:padding="70dp"
+ android:padding="50dp"
android:text="@string/play"
- android:textAppearance="@style/TextFont" />
+ android:textAppearance="@style/TextButtonFont" />
+ android:textAppearance="@style/TextButtonFont" />
+ android:textAppearance="@style/TextButtonFont" />
diff --git a/app/src/main/res/layout/food1_display.xml b/app/src/main/res/layout/food1_display.xml
index 711d85d..3684fdf 100644
--- a/app/src/main/res/layout/food1_display.xml
+++ b/app/src/main/res/layout/food1_display.xml
@@ -5,30 +5,25 @@
android:layout_height="match_parent"
android:orientation="vertical">
-
-
-
-
-
+ android:layout_alignParentTop="true"
+ android:layout_margin="10dp"
+ android:adjustViewBounds="true"
+ android:src="@drawable/sugar" />
-
+
@@ -45,6 +41,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
+ android:layout_margin="10dp"
android:layout_toEndOf="@id/bacon"
android:adjustViewBounds="true"
android:maxWidth="190dp"
@@ -55,6 +52,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
+ android:layout_margin="10dp"
android:layout_toEndOf="@id/apple"
android:adjustViewBounds="true"
android:maxWidth="190dp"
@@ -64,8 +62,9 @@
android:id="@+id/hot_dog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_toEndOf="@id/cake"
+ android:layout_alignParentStart="true"
+ android:layout_below="@id/cheese"
+ android:layout_margin="10dp"
android:adjustViewBounds="true"
android:maxWidth="200dp"
android:src="@drawable/hot_dog" />
@@ -74,8 +73,9 @@
android:id="@+id/cheese"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_above="@id/linear2"
android:layout_alignParentStart="true"
+ android:layout_below="@id/bacon"
+ android:layout_margin="10dp"
android:adjustViewBounds="true"
android:maxWidth="200dp"
android:src="@drawable/cheese" />
@@ -84,7 +84,8 @@
android:id="@+id/muskmelon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_above="@id/linear2"
+ android:layout_below="@id/apple"
+ android:layout_margin="10dp"
android:layout_toEndOf="@id/cheese"
android:adjustViewBounds="true"
android:maxWidth="200dp"
@@ -94,7 +95,8 @@
android:id="@+id/fries"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_above="@id/linear2"
+ android:layout_below="@id/cake"
+ android:layout_margin="10dp"
android:layout_toEndOf="@id/muskmelon"
android:adjustViewBounds="true"
android:maxWidth="180dp"
@@ -104,44 +106,41 @@
android:id="@+id/muffin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_above="@id/linear2"
- android:layout_toEndOf="@id/fries"
+ android:layout_below="@id/muskmelon"
+ android:layout_margin="10dp"
+ android:layout_toEndOf="@id/hot_dog"
android:adjustViewBounds="true"
android:maxWidth="200dp"
android:src="@drawable/muffin" />
-
+
+
-
-
-
-
-
-
-
-
+ android:layout_alignParentBottom="true"
+ android:layout_margin="10dp"
+ android:layout_toEndOf="@id/button_id_home"
+ android:layout_toStartOf="@id/announce_instruction"
+ android:gravity="center"
+ android:textAppearance="@style/TextFont" />
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/hygiene1_display.xml b/app/src/main/res/layout/hygiene1_display.xml
index 0e28d7f..4ddd227 100644
--- a/app/src/main/res/layout/hygiene1_display.xml
+++ b/app/src/main/res/layout/hygiene1_display.xml
@@ -5,16 +5,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
-
-
+
+
+ android:layout_margin="10dp"
+ android:layout_toEndOf="@id/button_id_home"
+ android:layout_toStartOf="@id/announce_instruction"
+ android:gravity="center"
+ android:textAppearance="@style/TextFont" />
+ android:layout_margin="10dp"
+ android:background="@drawable/speech_icon"
+ android:onClick="enonceConsigne" />
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/hygiene2_display.xml b/app/src/main/res/layout/hygiene2_display.xml
index acfc30e..48a7802 100644
--- a/app/src/main/res/layout/hygiene2_display.xml
+++ b/app/src/main/res/layout/hygiene2_display.xml
@@ -5,16 +5,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
-
-
+
+
+ android:layout_margin="10dp"
+ android:layout_toEndOf="@id/button_id_home"
+ android:layout_toStartOf="@id/announce_instruction"
+ android:gravity="center"
+ android:textAppearance="@style/TextFont" />
+ android:layout_margin="10dp"
+ android:background="@drawable/speech_icon"
+ android:onClick="enonceConsigne" />
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/hygiene3_display.xml b/app/src/main/res/layout/hygiene3_display.xml
index b099c68..8410801 100644
--- a/app/src/main/res/layout/hygiene3_display.xml
+++ b/app/src/main/res/layout/hygiene3_display.xml
@@ -5,16 +5,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
-
-
+
+
+ android:layout_margin="10dp"
+ android:layout_toEndOf="@id/button_id_home"
+ android:layout_toStartOf="@id/announce_instruction"
+ android:gravity="center"
+ android:textAppearance="@style/TextFont" />
+ android:layout_margin="10dp"
+ android:background="@drawable/speech_icon"
+ android:onClick="enonceConsigne" />
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/hygiene4_display.xml b/app/src/main/res/layout/hygiene4_display.xml
index fd6f52e..46b0471 100644
--- a/app/src/main/res/layout/hygiene4_display.xml
+++ b/app/src/main/res/layout/hygiene4_display.xml
@@ -114,37 +114,35 @@
android:maxWidth="230dp"
android:src="@drawable/trumpet" />
+
+
-
-
-
+ android:layout_margin="10dp"
+ android:background="@drawable/speech_icon"
+ android:onClick="enonceConsigne" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/hygiene5_display.xml b/app/src/main/res/layout/hygiene5_display.xml
index cc84b87..3ab16d5 100644
--- a/app/src/main/res/layout/hygiene5_display.xml
+++ b/app/src/main/res/layout/hygiene5_display.xml
@@ -68,36 +68,35 @@
android:maxWidth="200dp"
android:src="@drawable/toilet_bag" />
+
+
-
-
+ android:layout_margin="10dp"
+ android:background="@drawable/speech_icon"
+ android:onClick="enonceConsigne" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/hygiene6_display.xml b/app/src/main/res/layout/hygiene6_display.xml
index a7f3bff..189ac0b 100644
--- a/app/src/main/res/layout/hygiene6_display.xml
+++ b/app/src/main/res/layout/hygiene6_display.xml
@@ -49,36 +49,35 @@
android:maxWidth="250dp"
android:src="@drawable/blue_toothbrush_pic" />
-
-
+
+
+ android:layout_margin="10dp"
+ android:background="@drawable/speech_icon"
+ android:onClick="enonceConsigne" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/security1_display.xml b/app/src/main/res/layout/security1_display.xml
new file mode 100644
index 0000000..9386287
--- /dev/null
+++ b/app/src/main/res/layout/security1_display.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/theme_display.xml b/app/src/main/res/layout/theme_display.xml
index 4f83170..0e8827f 100644
--- a/app/src/main/res/layout/theme_display.xml
+++ b/app/src/main/res/layout/theme_display.xml
@@ -25,15 +25,16 @@
android:layout_weight="1"
android:onClick="healthPage"
android:text="@string/health"
- android:textAppearance="@style/TextFont" />
+ android:textAppearance="@style/TextButtonFont" />
+ android:textAppearance="@style/TextButtonFont" />
+ android:textAppearance="@style/TextButtonFont" />
@@ -59,7 +60,7 @@
android:layout_weight="1"
android:onClick="hygienePage"
android:text="@string/hygiene"
- android:textAppearance="@style/TextFont" />
+ android:textAppearance="@style/TextButtonFont" />
+ android:textAppearance="@style/TextButtonFont" />
+ android:textAppearance="@style/TextButtonFont" />
@@ -90,6 +91,6 @@
android:layout_alignParentBottom="true"
android:onClick="backHome"
android:text="@string/home"
- android:textAppearance="@style/TextFont" />
+ android:textAppearance="@style/TextButtonFont" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/tutorial1_display.xml b/app/src/main/res/layout/tutorial1_display.xml
index c13c2f7..f5381ca 100644
--- a/app/src/main/res/layout/tutorial1_display.xml
+++ b/app/src/main/res/layout/tutorial1_display.xml
@@ -4,16 +4,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
-
-
+
+
+ android:layout_margin="10dp"
+ android:background="@drawable/speech_icon"
+ android:onClick="enonceConsigne" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/tutorial2_display.xml b/app/src/main/res/layout/tutorial2_display.xml
index 9aca3e2..1fc37a7 100644
--- a/app/src/main/res/layout/tutorial2_display.xml
+++ b/app/src/main/res/layout/tutorial2_display.xml
@@ -5,16 +5,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
-
-
+
+
+ android:layout_margin="10dp"
+ android:background="@drawable/speech_icon"
+ android:onClick="enonceConsigne" />
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/tutorial3_display.xml b/app/src/main/res/layout/tutorial3_display.xml
index 1d4473d..3e4bc58 100644
--- a/app/src/main/res/layout/tutorial3_display.xml
+++ b/app/src/main/res/layout/tutorial3_display.xml
@@ -5,15 +5,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
-
+
+
+ android:layout_margin="10dp"
+ android:layout_toEndOf="@id/button_id_home"
+ android:layout_toStartOf="@id/announce_instruction"
+ android:gravity="center"
+ android:textAppearance="@style/TextFont" />
+ android:layout_margin="10dp"
+ android:background="@drawable/speech_icon"
+ android:onClick="enonceConsigne" />
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/tutorial4_display.xml b/app/src/main/res/layout/tutorial4_display.xml
index a05f031..5704cf1 100644
--- a/app/src/main/res/layout/tutorial4_display.xml
+++ b/app/src/main/res/layout/tutorial4_display.xml
@@ -150,36 +150,35 @@
android:layout_toEndOf="@id/green_rectangle44"
android:background="@drawable/blue_rectangle" />
-
-
-
+
+
+ android:layout_margin="10dp"
+ android:background="@drawable/speech_icon"
+ android:onClick="enonceConsigne" />
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/tutorial5_display.xml b/app/src/main/res/layout/tutorial5_display.xml
index 3018103..ca723da 100644
--- a/app/src/main/res/layout/tutorial5_display.xml
+++ b/app/src/main/res/layout/tutorial5_display.xml
@@ -112,36 +112,35 @@
android:layout_toEndOf="@id/green_rectangle54"
android:background="@drawable/blue_rectangle" />
-
-
-
+
+
+ android:layout_margin="10dp"
+ android:background="@drawable/speech_icon"
+ android:onClick="enonceConsigne" />
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 9cc3e10..90b941c 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -5,14 +5,14 @@
Santé
Hygiène
Autonomie
- Sécurité
- Sociabilité
+ Intégration des risques quotidiens
+ Comportements adaptés
Anatomie
Salle de bain
Tutoriel
Menu
Thème
Bravo ! Tu as réussi la mission. Clique sur l\'écran pour continuer à jouer.
- Lire consigne
+ Consigne
Alimentation
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 4934a9e..1d64ffd 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -16,4 +16,13 @@
- arial
+
+
--
libgit2 0.21.2