Commit b66e4091c4dccdf953ba69ed9e8d6129f4eb4248

Authored by aarnaude
1 parent 95306d09

ajout activités du thème hygiène

app/src/main/AndroidManifest.xml
... ... @@ -46,6 +46,37 @@
46 46 </activity>
47 47  
48 48 <activity
  49 + android:name=".Hygiene1Activity"
  50 + android:parentActivityName=".ThemeActivity"
  51 + android:screenOrientation="userLandscape">
  52 + <meta-data
  53 + android:name="android.support.PARENT_ACTIVITY"
  54 + android:value=".MainActivity" />
  55 + </activity>
  56 +
  57 + <activity
  58 + android:name=".Hygiene2Activity"
  59 + android:screenOrientation="userLandscape">
  60 + <meta-data
  61 + android:name="android.support.PARENT_ACTIVITY"
  62 + android:value=".MainActivity" />
  63 + </activity>
  64 + <activity
  65 + android:name=".Hygiene3Activity"
  66 + android:screenOrientation="userLandscape">
  67 + <meta-data
  68 + android:name="android.support.PARENT_ACTIVITY"
  69 + android:value=".MainActivity" />
  70 + </activity>
  71 +
  72 + <activity
  73 + android:name=".Hygiene4Activity"
  74 + android:screenOrientation="userLandscape">
  75 + <meta-data
  76 + android:name="android.support.PARENT_ACTIVITY"
  77 + android:value=".MainActivity" />
  78 + </activity>
  79 + <activity
49 80 android:name=".TutorialScene1Activity"
50 81 android:parentActivityName=".MainActivity"
51 82 android:screenOrientation="userLandscape">
... ...
app/src/main/java/tonio/noa/Hygiene1Activity.java 0 → 100644
... ... @@ -0,0 +1,100 @@
  1 +package tonio.noa;
  2 +
  3 +import android.content.ClipData;
  4 +import android.content.Intent;
  5 +import android.os.Build;
  6 +import android.os.Bundle;
  7 +import android.view.DragEvent;
  8 +import android.view.MotionEvent;
  9 +import android.view.View;
  10 +
  11 +/**
  12 + * Created by psyk on 31/01/18.
  13 + */
  14 +
  15 +public class Hygiene1Activity extends MyPlayActivity implements View.OnTouchListener, View.OnDragListener {
  16 +
  17 + @Override
  18 + protected void onCreate(Bundle savedInstanceState) {
  19 +
  20 + super.onCreate(savedInstanceState);
  21 + setContentView(R.layout.hygiene1_display);
  22 +
  23 + Intent i = new Intent(this, ConsigneActivity.class);
  24 + i.putExtra("keyConsigne", "Salut!\nTu peux mettre la brosse à dent bleu\nsur son ombre ?");
  25 + int requestCode = 0;
  26 + startActivityForResult(i, requestCode);
  27 +
  28 + }
  29 +
  30 + @Override
  31 + protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  32 + super.onActivityResult(requestCode, resultCode, data);
  33 + setContentView(R.layout.hygiene1_display);
  34 + findViewById(R.id.blue_toothbrush).setOnTouchListener(this);
  35 + findViewById(R.id.blue_toothbrush).setOnDragListener(this);
  36 + findViewById(R.id.shadow_toothbrush).setOnDragListener(this);
  37 + // do your stuff here after SecondActivity finished.
  38 + }
  39 +
  40 +
  41 + @Override
  42 + public boolean onTouch(View view, MotionEvent event) {
  43 + if (event.getAction() == MotionEvent.ACTION_DOWN) {
  44 +
  45 + View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);
  46 + ClipData data = ClipData.newPlainText("id", view.getResources().getResourceEntryName(view.getId()));
  47 +
  48 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
  49 + view.startDragAndDrop(data, shadowBuilder, view, 0);
  50 + } else {
  51 + view.startDrag(data, shadowBuilder, view, 0);
  52 + }
  53 + return true;
  54 + } else
  55 + return false;
  56 + }
  57 +
  58 + @Override
  59 + public boolean onDrag(View v, DragEvent event) {
  60 + switch (event.getAction()) {
  61 + // signal for the start of a drag and drop operation
  62 + case DragEvent.ACTION_DRAG_STARTED:
  63 + // do nothing
  64 + break;
  65 +
  66 + // the drag point has entered the bounding box of the View
  67 + case DragEvent.ACTION_DRAG_ENTERED:
  68 + // do nothing
  69 + break;
  70 +
  71 + // the user has moved the drag shadow outside the bounding box of the View
  72 + case DragEvent.ACTION_DRAG_EXITED:
  73 + // do nothing
  74 + break;
  75 +
  76 + // the drag and drop operation has concluded
  77 + case DragEvent.ACTION_DRAG_ENDED:
  78 + break;
  79 +
  80 + //drag shadow has been released,the drag point is within the bounding box of the View
  81 + case DragEvent.ACTION_DROP:
  82 + //handle the dragged view being dropped over a target view
  83 + View view = (View) event.getLocalState();
  84 + if (v == findViewById(R.id.shadow_toothbrush)) {
  85 + //stop displaying the view where it was before it was dragged
  86 + view.setVisibility(View.INVISIBLE);
  87 + bravoPage(v);
  88 + }
  89 + break;
  90 + }
  91 +
  92 + return true;
  93 + }
  94 +
  95 +
  96 + @Override
  97 + protected void next() {
  98 + startActivity(new Intent(this, Hygiene2Activity.class));
  99 + }
  100 +}
... ...
app/src/main/java/tonio/noa/Hygiene2Activity.java 0 → 100644
... ... @@ -0,0 +1,100 @@
  1 +package tonio.noa;
  2 +
  3 +import android.content.ClipData;
  4 +import android.content.Intent;
  5 +import android.os.Build;
  6 +import android.os.Bundle;
  7 +import android.view.DragEvent;
  8 +import android.view.MotionEvent;
  9 +import android.view.View;
  10 +
  11 +/**
  12 + * Created by psyk on 31/01/18.
  13 + */
  14 +
  15 +public class Hygiene2Activity extends MyPlayActivity implements View.OnTouchListener, View.OnDragListener {
  16 +
  17 + @Override
  18 + protected void onCreate(Bundle savedInstanceState) {
  19 +
  20 + super.onCreate(savedInstanceState);
  21 + setContentView(R.layout.hygiene2_display);
  22 +
  23 + Intent i = new Intent(this, ConsigneActivity.class);
  24 + i.putExtra("keyConsigne", "Maintenant met le dessin de la brosse à dent\nsur la photo de la brosse à dent.");
  25 + int requestCode = 0;
  26 + startActivityForResult(i, requestCode);
  27 +
  28 + }
  29 +
  30 + @Override
  31 + protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  32 + super.onActivityResult(requestCode, resultCode, data);
  33 + setContentView(R.layout.hygiene2_display);
  34 + findViewById(R.id.blue_toothbrush).setOnTouchListener(this);
  35 + findViewById(R.id.blue_toothbrush).setOnDragListener(this);
  36 + findViewById(R.id.blue_toothbrush_pic).setOnDragListener(this);
  37 + // do your stuff here after SecondActivity finished.
  38 + }
  39 +
  40 +
  41 + @Override
  42 + public boolean onTouch(View view, MotionEvent event) {
  43 + if (event.getAction() == MotionEvent.ACTION_DOWN) {
  44 +
  45 + View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);
  46 + ClipData data = ClipData.newPlainText("id", view.getResources().getResourceEntryName(view.getId()));
  47 +
  48 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
  49 + view.startDragAndDrop(data, shadowBuilder, view, 0);
  50 + } else {
  51 + view.startDrag(data, shadowBuilder, view, 0);
  52 + }
  53 + return true;
  54 + } else
  55 + return false;
  56 + }
  57 +
  58 + @Override
  59 + public boolean onDrag(View v, DragEvent event) {
  60 + switch (event.getAction()) {
  61 + // signal for the start of a drag and drop operation
  62 + case DragEvent.ACTION_DRAG_STARTED:
  63 + // do nothing
  64 + break;
  65 +
  66 + // the drag point has entered the bounding box of the View
  67 + case DragEvent.ACTION_DRAG_ENTERED:
  68 + // do nothing
  69 + break;
  70 +
  71 + // the user has moved the drag shadow outside the bounding box of the View
  72 + case DragEvent.ACTION_DRAG_EXITED:
  73 + // do nothing
  74 + break;
  75 +
  76 + // the drag and drop operation has concluded
  77 + case DragEvent.ACTION_DRAG_ENDED:
  78 + break;
  79 +
  80 + //drag shadow has been released,the drag point is within the bounding box of the View
  81 + case DragEvent.ACTION_DROP:
  82 + //handle the dragged view being dropped over a target view
  83 + View view = (View) event.getLocalState();
  84 + if (v == findViewById(R.id.blue_toothbrush_pic)) {
  85 + //stop displaying the view where it was before it was dragged
  86 + view.setVisibility(View.INVISIBLE);
  87 + bravoPage(v);
  88 + }
  89 + break;
  90 + }
  91 +
  92 + return true;
  93 + }
  94 +
  95 +
  96 + @Override
  97 + protected void next() {
  98 + startActivity(new Intent(this, Hygiene3Activity.class));
  99 + }
  100 +}
... ...
app/src/main/java/tonio/noa/Hygiene3Activity.java 0 → 100644
... ... @@ -0,0 +1,100 @@
  1 +package tonio.noa;
  2 +
  3 +import android.content.ClipData;
  4 +import android.content.Intent;
  5 +import android.os.Build;
  6 +import android.os.Bundle;
  7 +import android.view.DragEvent;
  8 +import android.view.MotionEvent;
  9 +import android.view.View;
  10 +
  11 +/**
  12 + * Created by psyk on 31/01/18.
  13 + */
  14 +
  15 +public class Hygiene3Activity extends MyPlayActivity implements View.OnTouchListener, View.OnDragListener {
  16 +
  17 + @Override
  18 + protected void onCreate(Bundle savedInstanceState) {
  19 +
  20 + super.onCreate(savedInstanceState);
  21 + setContentView(R.layout.hygiene3_display);
  22 +
  23 + Intent i = new Intent(this, ConsigneActivity.class);
  24 + i.putExtra("keyConsigne", "Tu peux mettre la brosse à dent bleu\nsur la rouge?");
  25 + int requestCode = 0;
  26 + startActivityForResult(i, requestCode);
  27 +
  28 + }
  29 +
  30 + @Override
  31 + protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  32 + super.onActivityResult(requestCode, resultCode, data);
  33 + setContentView(R.layout.hygiene3_display);
  34 + findViewById(R.id.blue_toothbrush).setOnTouchListener(this);
  35 + findViewById(R.id.blue_toothbrush).setOnDragListener(this);
  36 + findViewById(R.id.red_toothbrush).setOnDragListener(this);
  37 + // do your stuff here after SecondActivity finished.
  38 + }
  39 +
  40 +
  41 + @Override
  42 + public boolean onTouch(View view, MotionEvent event) {
  43 + if (event.getAction() == MotionEvent.ACTION_DOWN) {
  44 +
  45 + View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);
  46 + ClipData data = ClipData.newPlainText("id", view.getResources().getResourceEntryName(view.getId()));
  47 +
  48 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
  49 + view.startDragAndDrop(data, shadowBuilder, view, 0);
  50 + } else {
  51 + view.startDrag(data, shadowBuilder, view, 0);
  52 + }
  53 + return true;
  54 + } else
  55 + return false;
  56 + }
  57 +
  58 + @Override
  59 + public boolean onDrag(View v, DragEvent event) {
  60 + switch (event.getAction()) {
  61 + // signal for the start of a drag and drop operation
  62 + case DragEvent.ACTION_DRAG_STARTED:
  63 + // do nothing
  64 + break;
  65 +
  66 + // the drag point has entered the bounding box of the View
  67 + case DragEvent.ACTION_DRAG_ENTERED:
  68 + // do nothing
  69 + break;
  70 +
  71 + // the user has moved the drag shadow outside the bounding box of the View
  72 + case DragEvent.ACTION_DRAG_EXITED:
  73 + // do nothing
  74 + break;
  75 +
  76 + // the drag and drop operation has concluded
  77 + case DragEvent.ACTION_DRAG_ENDED:
  78 + break;
  79 +
  80 + //drag shadow has been released,the drag point is within the bounding box of the View
  81 + case DragEvent.ACTION_DROP:
  82 + //handle the dragged view being dropped over a target view
  83 + View view = (View) event.getLocalState();
  84 + if (v == findViewById(R.id.red_toothbrush)) {
  85 + //stop displaying the view where it was before it was dragged
  86 + view.setVisibility(View.INVISIBLE);
  87 + bravoPage(v);
  88 + }
  89 + break;
  90 + }
  91 +
  92 + return true;
  93 + }
  94 +
  95 +
  96 + @Override
  97 + protected void next() {
  98 + startActivity(new Intent(this, Hygiene4Activity.class));
  99 + }
  100 +}
... ...
app/src/main/java/tonio/noa/Hygiene4Activity.java 0 → 100644
... ... @@ -0,0 +1,127 @@
  1 +package tonio.noa;
  2 +
  3 +import android.content.ClipData;
  4 +import android.content.Intent;
  5 +import android.os.Build;
  6 +import android.os.Bundle;
  7 +import android.view.DragEvent;
  8 +import android.view.MotionEvent;
  9 +import android.view.View;
  10 +
  11 +/**
  12 + * Created by psyk on 24/01/18.
  13 + */
  14 +
  15 +public class Hygiene4Activity extends MyPlayActivity implements View.OnTouchListener, View.OnDragListener {
  16 +
  17 + private int win_counter = 0;
  18 + private boolean done = false;
  19 +
  20 + @Override
  21 + protected void onCreate(Bundle savedInstanceState) {
  22 +
  23 + super.onCreate(savedInstanceState);
  24 + Intent i = new Intent(this, ConsigneActivity.class);
  25 + i.putExtra("keyConsigne", "Tu peux m'aider ?\nPrépare mes affaires de toilette.");
  26 + int requestCode = 0;
  27 + startActivityForResult(i, requestCode);
  28 +
  29 + }
  30 +
  31 + protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  32 + super.onActivityResult(requestCode, resultCode, data);
  33 +
  34 + setContentView(R.layout.hygiene4_display);
  35 +
  36 + findViewById(R.id.snail).setOnTouchListener(this);
  37 + findViewById(R.id.towel).setOnTouchListener(this);
  38 + findViewById(R.id.elephant).setOnTouchListener(this);
  39 + findViewById(R.id.bmw).setOnTouchListener(this);
  40 + findViewById(R.id.toothpaste).setOnTouchListener(this);
  41 + findViewById(R.id.blue_toothbrush_pic).setOnTouchListener(this);
  42 + findViewById(R.id.trumpet).setOnTouchListener(this);
  43 + findViewById(R.id.soap).setOnTouchListener(this);
  44 + findViewById(R.id.shampoo).setOnTouchListener(this);
  45 +
  46 + findViewById(R.id.anchor_toilet_bag).setOnDragListener(this);
  47 + findViewById(R.id.snail).setOnDragListener(this);
  48 + findViewById(R.id.towel).setOnDragListener(this);
  49 + findViewById(R.id.elephant).setOnDragListener(this);
  50 + findViewById(R.id.bmw).setOnDragListener(this);
  51 + findViewById(R.id.toothpaste).setOnDragListener(this);
  52 + findViewById(R.id.blue_toothbrush_pic).setOnDragListener(this);
  53 + findViewById(R.id.trumpet).setOnDragListener(this);
  54 + findViewById(R.id.soap).setOnDragListener(this);
  55 + findViewById(R.id.shampoo).setOnDragListener(this);
  56 + }
  57 +
  58 + @Override
  59 + public boolean onTouch(View view, MotionEvent event) {
  60 + if (event.getAction() == MotionEvent.ACTION_DOWN) {
  61 +
  62 + View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);
  63 + ClipData data = ClipData.newPlainText("id", view.getResources().getResourceEntryName(view.getId()));
  64 +
  65 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
  66 + view.startDragAndDrop(data, shadowBuilder, view, 0);
  67 + } else {
  68 + view.startDrag(data, shadowBuilder, view, 0);
  69 + }
  70 + return true;
  71 + } else
  72 + return false;
  73 + }
  74 +
  75 + @Override
  76 + public boolean onDrag(View v, DragEvent event) {
  77 + switch (event.getAction()) {
  78 + // signal for the start of a drag and drop operation
  79 + case DragEvent.ACTION_DRAG_STARTED:
  80 + // do nothing
  81 + break;
  82 +
  83 + // the drag point has entered the bounding box of the View
  84 + case DragEvent.ACTION_DRAG_ENTERED:
  85 + // do nothing
  86 + break;
  87 +
  88 + // the user has moved the drag shadow outside the bounding box of the View
  89 + case DragEvent.ACTION_DRAG_EXITED:
  90 + // do nothing
  91 + break;
  92 +
  93 + // the drag and drop operation has concluded
  94 + case DragEvent.ACTION_DRAG_ENDED:
  95 + if (win_counter == 5 && !done) {
  96 + done = true;
  97 + bravoPage(v);
  98 + }
  99 + break;
  100 +
  101 + //drag shadow has been released,the drag point is within the bounding box of the View
  102 + case DragEvent.ACTION_DROP:
  103 + //handle the dragged view being dropped over a target view
  104 + View view = (View) event.getLocalState();
  105 + if (v == findViewById(R.id.anchor_toilet_bag)) {
  106 + if (view == findViewById(R.id.towel)
  107 + || view == findViewById(R.id.toothpaste)
  108 + || view == findViewById(R.id.blue_toothbrush_pic)
  109 + || view == findViewById(R.id.shampoo)
  110 + || view == findViewById(R.id.soap)) {
  111 + //stop displaying the view where it was before it was dragged
  112 + view.setVisibility(View.INVISIBLE);
  113 + win_counter++;
  114 + }
  115 + else
  116 + }
  117 + break;
  118 + }
  119 + return true;
  120 + }
  121 +
  122 +
  123 + @Override
  124 + protected void next() {
  125 +
  126 + }
  127 +}
... ...
app/src/main/java/tonio/noa/ThemeActivity.java
... ... @@ -24,7 +24,10 @@ public class ThemeActivity extends Activity {
24 24  
25 25 startActivity(new Intent(this, HealthActivity.class));
26 26 }
  27 + public void hygienePage(View view){
27 28  
  29 + startActivity(new Intent(this, Hygiene1Activity.class));
  30 + }
28 31 public void backHome(View view){
29 32  
30 33 startActivity(new Intent( this, MainActivity.class));
... ...
app/src/main/java/tonio/noa/TutorialScene1Activity.java
... ... @@ -13,7 +13,7 @@ public class TutorialScene1Activity extends MyPlayActivity{
13 13 protected void onCreate(Bundle savedInstanceState) {
14 14 super.onCreate(savedInstanceState);
15 15 Intent i = new Intent(this, ConsigneActivity.class);
16   - i.putExtra("keyConsigne","Salut mon pote!\nJe suis Noa.\nTu peux m'aider ?\nRetrouve mon ballon de football.");
  16 + i.putExtra("keyConsigne","Salut!\nJe suis Noa.\nTu peux retrouver mon ballon de football?\nTouche l'écran pour m'aider.");
17 17 int requestCode = 0;
18 18 startActivityForResult(i,requestCode);
19 19 }
... ...
app/src/main/java/tonio/noa/TutorialScene4Activity.java
... ... @@ -22,7 +22,7 @@ public class TutorialScene4Activity extends MyPlayActivity implements View.OnTou
22 22  
23 23 super.onCreate(savedInstanceState);
24 24 Intent i = new Intent(this, ConsigneActivity.class);
25   - i.putExtra("keyConsigne", "Tu peux mettre les petits carrés de couleurs sur les gros de la même couleur ?\nMerci mon pote!");
  25 + i.putExtra("keyConsigne", "Tu peux mettre les petits carrés de couleurs sur les gros de la même couleur ?\nMerci !");
26 26 int requestCode = 0;
27 27 startActivityForResult(i, requestCode);
28 28  
... ...
app/src/main/res/drawable/blue_toothbrush.png 0 → 100644

74.3 KB

app/src/main/res/drawable/blue_toothbrush_pic.png 0 → 100644

128 KB

app/src/main/res/drawable/bmw.png 0 → 100644

370 KB

app/src/main/res/drawable/elephant.png 0 → 100644

132 KB

app/src/main/res/drawable/red_toothbrush.png 0 → 100644

79 KB

app/src/main/res/drawable/shampoo.png 0 → 100644

53.3 KB

app/src/main/res/drawable/snail.png 0 → 100644

353 KB

app/src/main/res/drawable/soap.png 0 → 100644

224 KB

app/src/main/res/drawable/toilet_bag.png 0 → 100644

517 KB

app/src/main/res/drawable/toothpaste.png 0 → 100644

99.3 KB

app/src/main/res/drawable/towel.png 0 → 100644

323 KB

app/src/main/res/drawable/trumpet.png 0 → 100644

202 KB

app/src/main/res/layout/hygiene1_display.xml 0 → 100644
... ... @@ -0,0 +1,51 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:id="@+id/hyg1"
  4 + android:layout_width="match_parent"
  5 + android:layout_height="match_parent"
  6 + android:orientation="vertical">
  7 +
  8 + <TextView
  9 + android:layout_width="wrap_content"
  10 + android:layout_height="wrap_content"
  11 + android:layout_alignParentBottom="true"
  12 + android:layout_centerHorizontal="true"
  13 + android:layout_margin="20dp"
  14 + android:maxWidth="500dp"
  15 + android:text="Met la brosse à dent dans la case correspondante."
  16 + android:textAppearance="@style/TextFont" />
  17 +
  18 + <ImageView
  19 + android:id="@+id/blue_toothbrush"
  20 + android:layout_width="wrap_content"
  21 + android:layout_height="wrap_content"
  22 + android:layout_alignParentStart="true"
  23 + android:layout_centerVertical="true"
  24 + android:layout_margin="100dp"
  25 + android:adjustViewBounds="true"
  26 + android:maxWidth="300dp"
  27 + android:src="@drawable/blue_toothbrush" />
  28 +
  29 + <ImageView
  30 + android:id="@+id/shadow_toothbrush"
  31 + android:layout_width="wrap_content"
  32 + android:layout_height="wrap_content"
  33 + android:layout_alignParentEnd="true"
  34 + android:layout_centerVertical="true"
  35 + android:layout_margin="100dp"
  36 + android:adjustViewBounds="true"
  37 + android:maxWidth="300dp"
  38 + android:src="@drawable/blue_toothbrush"
  39 + android:tint="#707070" />
  40 +
  41 + <Button
  42 + android:id="@+id/button_id_home"
  43 + android:layout_width="wrap_content"
  44 + android:layout_height="wrap_content"
  45 + android:layout_alignParentBottom="true"
  46 + android:layout_alignParentStart="true"
  47 + android:layout_margin="10dp"
  48 + android:onClick="backHome"
  49 + android:text="@string/home" />
  50 +
  51 +</RelativeLayout>
0 52 \ No newline at end of file
... ...
app/src/main/res/layout/hygiene2_display.xml 0 → 100644
... ... @@ -0,0 +1,50 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:id="@+id/hyg2"
  4 + android:layout_width="match_parent"
  5 + android:layout_height="match_parent"
  6 + android:orientation="vertical">
  7 +
  8 + <TextView
  9 + android:layout_width="wrap_content"
  10 + android:layout_height="wrap_content"
  11 + android:layout_alignParentBottom="true"
  12 + android:layout_centerHorizontal="true"
  13 + android:layout_margin="20dp"
  14 + android:maxWidth="500dp"
  15 + android:text="Met la brosse à dent dans la case correspondante."
  16 + android:textAppearance="@style/TextFont" />
  17 +
  18 + <ImageView
  19 + android:id="@+id/blue_toothbrush"
  20 + android:layout_width="wrap_content"
  21 + android:layout_height="wrap_content"
  22 + android:layout_alignParentStart="true"
  23 + android:layout_centerVertical="true"
  24 + android:layout_margin="100dp"
  25 + android:adjustViewBounds="true"
  26 + android:maxWidth="300dp"
  27 + android:src="@drawable/blue_toothbrush" />
  28 +
  29 + <ImageView
  30 + android:id="@+id/blue_toothbrush_pic"
  31 + android:layout_width="wrap_content"
  32 + android:layout_height="wrap_content"
  33 + android:layout_alignParentEnd="true"
  34 + android:layout_centerVertical="true"
  35 + android:layout_margin="100dp"
  36 + android:adjustViewBounds="true"
  37 + android:maxWidth="300dp"
  38 + android:src="@drawable/blue_toothbrush_pic" />
  39 +
  40 + <Button
  41 + android:id="@+id/button_id_home"
  42 + android:layout_width="wrap_content"
  43 + android:layout_height="wrap_content"
  44 + android:layout_alignParentBottom="true"
  45 + android:layout_alignParentStart="true"
  46 + android:layout_margin="10dp"
  47 + android:onClick="backHome"
  48 + android:text="@string/home" />
  49 +
  50 +</RelativeLayout>
0 51 \ No newline at end of file
... ...
app/src/main/res/layout/hygiene3_display.xml 0 → 100644
... ... @@ -0,0 +1,50 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:id="@+id/hyg3"
  4 + android:layout_width="match_parent"
  5 + android:layout_height="match_parent"
  6 + android:orientation="vertical">
  7 +
  8 + <TextView
  9 + android:layout_width="wrap_content"
  10 + android:layout_height="wrap_content"
  11 + android:layout_alignParentBottom="true"
  12 + android:layout_centerHorizontal="true"
  13 + android:layout_margin="20dp"
  14 + android:maxWidth="500dp"
  15 + android:text="Met la brosse à dent bleu sur la rouge."
  16 + android:textAppearance="@style/TextFont" />
  17 +
  18 + <ImageView
  19 + android:id="@+id/blue_toothbrush"
  20 + android:layout_width="wrap_content"
  21 + android:layout_height="wrap_content"
  22 + android:layout_alignParentStart="true"
  23 + android:layout_centerVertical="true"
  24 + android:layout_margin="100dp"
  25 + android:adjustViewBounds="true"
  26 + android:maxWidth="300dp"
  27 + android:src="@drawable/blue_toothbrush" />
  28 +
  29 + <ImageView
  30 + android:id="@+id/red_toothbrush"
  31 + android:layout_width="wrap_content"
  32 + android:layout_height="wrap_content"
  33 + android:layout_alignParentEnd="true"
  34 + android:layout_centerVertical="true"
  35 + android:layout_margin="100dp"
  36 + android:adjustViewBounds="true"
  37 + android:maxWidth="300dp"
  38 + android:src="@drawable/red_toothbrush" />
  39 +
  40 + <Button
  41 + android:id="@+id/button_id_home"
  42 + android:layout_width="wrap_content"
  43 + android:layout_height="wrap_content"
  44 + android:layout_alignParentBottom="true"
  45 + android:layout_alignParentStart="true"
  46 + android:layout_margin="10dp"
  47 + android:onClick="backHome"
  48 + android:text="@string/home" />
  49 +
  50 +</RelativeLayout>
0 51 \ No newline at end of file
... ...
app/src/main/res/layout/hygiene4_display.xml 0 → 100644
... ... @@ -0,0 +1,138 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:id="@+id/hyg4"
  4 + android:layout_width="match_parent"
  5 + android:layout_height="match_parent"
  6 + android:orientation="vertical">
  7 +
  8 + <ImageView
  9 + android:id="@+id/anchor_toilet_bag"
  10 + android:layout_width="wrap_content"
  11 + android:layout_height="wrap_content"
  12 + android:layout_centerHorizontal="true"
  13 + android:layout_margin="10dp"
  14 + android:adjustViewBounds="true"
  15 + android:maxWidth="400dp"
  16 + android:src="@drawable/toilet_bag" />
  17 +
  18 + <ImageView
  19 + android:id="@+id/soap"
  20 + android:layout_width="wrap_content"
  21 + android:layout_height="wrap_content"
  22 + android:layout_alignParentStart="true"
  23 + android:layout_below="@id/anchor_toilet_bag"
  24 + android:layout_margin="10dp"
  25 + android:adjustViewBounds="true"
  26 + android:maxWidth="150dp"
  27 + android:src="@drawable/soap" />
  28 +
  29 + <ImageView
  30 + android:id="@+id/bmw"
  31 + android:layout_width="wrap_content"
  32 + android:layout_height="wrap_content"
  33 + android:layout_below="@id/anchor_toilet_bag"
  34 + android:layout_margin="10dp"
  35 + android:layout_toEndOf="@id/soap"
  36 + android:adjustViewBounds="true"
  37 + android:maxWidth="200dp"
  38 + android:src="@drawable/bmw" />
  39 +
  40 + <ImageView
  41 + android:id="@+id/elephant"
  42 + android:layout_width="wrap_content"
  43 + android:layout_height="wrap_content"
  44 + android:layout_below="@id/anchor_toilet_bag"
  45 + android:layout_margin="10dp"
  46 + android:layout_toStartOf="@id/shampoo"
  47 + android:adjustViewBounds="true"
  48 + android:maxWidth="180dp"
  49 + android:src="@drawable/elephant" />
  50 +
  51 + <ImageView
  52 + android:id="@+id/shampoo"
  53 + android:layout_width="wrap_content"
  54 + android:layout_height="wrap_content"
  55 + android:layout_alignParentEnd="true"
  56 + android:layout_below="@id/anchor_toilet_bag"
  57 + android:layout_margin="10dp"
  58 + android:adjustViewBounds="true"
  59 + android:maxWidth="120dp"
  60 + android:src="@drawable/shampoo" />
  61 +
  62 + <ImageView
  63 + android:id="@+id/toothpaste"
  64 + android:layout_width="wrap_content"
  65 + android:layout_height="wrap_content"
  66 + android:layout_below="@id/blue_toothbrush_pic"
  67 + android:layout_margin="10dp"
  68 + android:layout_toEndOf="@id/trumpet"
  69 + android:adjustViewBounds="true"
  70 + android:maxWidth="200dp"
  71 + android:src="@drawable/toothpaste" />
  72 +
  73 + <ImageView
  74 + android:id="@+id/blue_toothbrush_pic"
  75 + android:layout_width="wrap_content"
  76 + android:layout_height="wrap_content"
  77 + android:layout_below="@id/anchor_toilet_bag"
  78 + android:layout_centerHorizontal="true"
  79 + android:layout_margin="10dp"
  80 + android:layout_toEndOf="@id/trumpet"
  81 + android:adjustViewBounds="true"
  82 + android:maxWidth="200dp"
  83 + android:src="@drawable/blue_toothbrush_pic" />
  84 +
  85 + <ImageView
  86 + android:id="@+id/towel"
  87 + android:layout_width="wrap_content"
  88 + android:layout_height="wrap_content"
  89 + android:layout_below="@id/soap"
  90 + android:layout_margin="10dp"
  91 + android:adjustViewBounds="true"
  92 + android:maxWidth="150dp"
  93 + android:src="@drawable/towel" />
  94 +
  95 + <ImageView
  96 + android:id="@+id/snail"
  97 + android:layout_width="wrap_content"
  98 + android:layout_height="wrap_content"
  99 + android:layout_alignParentEnd="true"
  100 + android:layout_below="@id/shampoo"
  101 + android:layout_margin="10dp"
  102 + android:adjustViewBounds="true"
  103 + android:maxWidth="200dp"
  104 + android:src="@drawable/snail" />
  105 +
  106 + <ImageView
  107 + android:id="@+id/trumpet"
  108 + android:layout_width="wrap_content"
  109 + android:layout_height="wrap_content"
  110 + android:layout_below="@id/soap"
  111 + android:layout_margin="10dp"
  112 + android:layout_toEndOf="@id/towel"
  113 + android:adjustViewBounds="true"
  114 + android:maxWidth="230dp"
  115 + android:src="@drawable/trumpet" />
  116 +
  117 + <TextView
  118 + android:id="@+id/text4"
  119 + android:layout_width="wrap_content"
  120 + android:layout_height="wrap_content"
  121 + android:layout_alignParentBottom="true"
  122 + android:layout_centerHorizontal="true"
  123 + android:layout_margin="20dp"
  124 + android:text="Met les carrés dans les cases correspondantes."
  125 + android:textAppearance="@style/TextFont" />
  126 +
  127 +
  128 + <Button
  129 + android:id="@+id/button_id_home"
  130 + android:layout_width="wrap_content"
  131 + android:layout_height="wrap_content"
  132 + android:layout_alignParentBottom="true"
  133 + android:layout_alignParentStart="true"
  134 + android:layout_margin="5dp"
  135 + android:onClick="backHome"
  136 + android:text="@string/home" />
  137 +
  138 +</RelativeLayout>
0 139 \ No newline at end of file
... ...
app/src/main/res/layout/theme_display.xml
... ... @@ -19,6 +19,7 @@
19 19 android:layout_height="wrap_content"
20 20 android:layout_alignParentRight="true"
21 21 android:layout_alignParentTop="true"
  22 + android:onClick="hygienePage"
22 23 android:text="@string/hygiene" />
23 24  
24 25 <Button
... ...