commit c5d63679f25a78a321f8d96c53e448b7197a84c2
parent ab3924cb1e0791489ffdae2f61cd4dd3be17ad51
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date: Thu, 3 Feb 2011 01:18:47 +0100
Merge branch 'master' of github:jsmaniac/2011-m1s2-ter
Diffstat:
5 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/code/PtiClic/res/layout/game.xml b/code/PtiClic/res/layout/game.xml
@@ -3,17 +3,17 @@
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"
- android:orientation="vertical" android:layout_weight="1">
+ <LinearLayout android:layout_width="fill_parent"
+ android:layout_height="fill_parent" android:orientation="vertical"
+ android:layout_weight="1">
<TextView android:id="@+id/mainWord" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="mainWord"
- android:textSize="30sp" android:textStyle="bold" android:gravity="center">
+ android:textStyle="bold" android:gravity="center" android:textSize="30dip">
</TextView>
<TextView android:id="@+id/currentWord" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="currentWord"
- android:textStyle="bold" android:gravity="center">
+ android:textStyle="bold" android:gravity="center" android:textSize="20dip">
</TextView>
@@ -32,8 +32,8 @@
android:layout_weight="1" android:layout_gravity="bottom">
</Button>
<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">
+ android:layout_width="fill_parent"
+ android:layout_weight="1" android:layout_gravity="bottom" android:layout_height="fill_parent">
</Button>
<Button android:id="@+id/relation3" android:text="relation3"
android:layout_height="wrap_content" android:layout_width="fill_parent"
diff --git a/code/PtiClic/res/xml/prefs.xml b/code/PtiClic/res/xml/prefs.xml
@@ -3,8 +3,8 @@
<PreferenceCategory android:title="Connexion">
- <EditTextPreference android:title="Login" android:key="login" android:summary=""/>
- <EditTextPreference android:title="Mot de Passe" android:key="passwd"/>
+ <EditTextPreference android:title="Login" android:key="login" android:summary="" android:dialogTitle="Entrer nom utilisateur"/>
+ <EditTextPreference android:title="Mot de Passe" android:key="passwd" android:dialogTitle="Entrer mot de passe" android:password="true"/>
</PreferenceCategory>
<PreferenceCategory android:title="Debug">
diff --git a/code/PtiClic/src/org/pticlic/FrontPage.java b/code/PtiClic/src/org/pticlic/FrontPage.java
@@ -19,11 +19,17 @@ public class FrontPage extends Activity implements OnClickListener{
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.frontpage);
+
// Écoute des clics sur les différents boutons
((ImageView)findViewById(R.id.prefs)).setOnClickListener(this);
((ImageView)findViewById(R.id.play)).setOnClickListener(this);
((ImageView)findViewById(R.id.infoButton)).setOnClickListener(this);
-
+ }
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+
// On récupère le nom du joueur des préférences.
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
String loginPref = sp.getString("login", "joueur");
diff --git a/code/PtiClic/src/org/pticlic/Main.java b/code/PtiClic/src/org/pticlic/Main.java
@@ -29,5 +29,12 @@ public class Main extends Activity {
super.onActivityResult(requestCode, resultCode, data);
}
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+
+ finish();
+ }
}
\ No newline at end of file
diff --git a/code/PtiClic/src/org/pticlic/Score.java b/code/PtiClic/src/org/pticlic/Score.java
@@ -65,6 +65,5 @@ public class Score extends Activity implements OnClickListener{
if (v.getId()==R.id.saw) {
finish();
}
-
}
}