Merge branch 'master' of https://github.com/jsmaniac/2011-m1s2-ter
This commit is contained in:
commit
2327e221dc
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout android:id="@+id/widget29"
|
||||
android:layout_width="fill_parent" android:layout_height="fill_parent"
|
||||
android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" android:orientation="vertical"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<LinearLayout android:id="@+id/widget40"
|
||||
android:layout_width="fill_parent" android:layout_height="fill_parent"
|
||||
|
@ -15,27 +15,33 @@
|
|||
android:layout_height="wrap_content" android:text="currentWord"
|
||||
android:textStyle="bold" android:gravity="center">
|
||||
</TextView>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/widget44"
|
||||
android:orientation="horizontal" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_weight="9">
|
||||
<LinearLayout android:orientation="horizontal"
|
||||
android:layout_height="fill_parent" android:layout_width="fill_parent"
|
||||
android:layout_weight="9">
|
||||
|
||||
<Button android:id="@+id/relation1"
|
||||
android:text="relation1" android:layout_height="wrap_content" android:layout_weight="1" android:layout_width="fill_parent" android:layout_gravity="bottom">
|
||||
<Button android:id="@+id/relation1" android:text="relation1"
|
||||
android:layout_height="wrap_content" android:layout_weight="1"
|
||||
android:layout_width="fill_parent" android:layout_gravity="bottom">
|
||||
</Button>
|
||||
<Button android:id="@+id/relation2"
|
||||
android:text="relation2" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="1" android:layout_gravity="bottom">
|
||||
<Button android:id="@+id/relation2" android:text="relation2"
|
||||
android:layout_height="wrap_content" android:layout_width="fill_parent"
|
||||
android:layout_weight="1" android:layout_gravity="bottom">
|
||||
</Button>
|
||||
<Button android:id="@+id/poubelle"
|
||||
android:text="poubelle" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="1" android:layout_gravity="bottom">
|
||||
<Button android:id="@+id/trash" android:text="trash"
|
||||
android:layout_height="wrap_content" android:layout_width="fill_parent"
|
||||
android:layout_weight="1" android:layout_gravity="bottom">
|
||||
</Button>
|
||||
<Button android:id="@+id/relation3"
|
||||
android:text="relation3" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="1" android:layout_gravity="bottom">
|
||||
<Button android:id="@+id/relation3" android:text="relation3"
|
||||
android:layout_height="wrap_content" android:layout_width="fill_parent"
|
||||
android:layout_weight="1" android:layout_gravity="bottom">
|
||||
</Button>
|
||||
<Button android:id="@+id/relation4"
|
||||
android:text="relation4" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="1" android:layout_gravity="bottom">
|
||||
<Button android:id="@+id/relation4" android:text="relation4"
|
||||
android:layout_height="wrap_content" android:layout_width="fill_parent"
|
||||
android:layout_weight="1" android:layout_gravity="bottom">
|
||||
</Button>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -74,7 +74,9 @@ public class BaseGame extends Activity implements OnClickListener {
|
|||
Button r4 = ((Button)findViewById(R.id.relation4));
|
||||
|
||||
// TODO : Pour l'instant la poubelle ne fait rien. Il faudra certainement la ranger dans un categorie dans GamePlayed pour calculer le score.
|
||||
((Button)findViewById(R.id.poubelle)).setText("Poubelle");
|
||||
Button trash = ((Button)findViewById(R.id.trash));
|
||||
trash.setOnClickListener(this);
|
||||
trash.setText("poubelle");
|
||||
|
||||
// Écoute des clics sur les relations
|
||||
if (nbrel > 0) { r1.setOnClickListener(this); r1.setText(r.getRelationName(game.getCat1())); } else { r1.setVisibility(View.GONE); }
|
||||
|
@ -167,6 +169,7 @@ public class BaseGame extends Activity implements OnClickListener {
|
|||
case (R.id.relation2) : gamePlayed.add(2, currentWord); next(); break;
|
||||
case (R.id.relation3) : gamePlayed.add(3, currentWord); next(); break;
|
||||
case (R.id.relation4) : gamePlayed.add(4, currentWord); next(); break;
|
||||
case (R.id.trash) : gamePlayed.add(0, currentWord); next(); break;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user