Affichage plus ou moins correcte du message d'erreur de connexion
authorDa Risk <darisk972@gmail.com>
Fri, 26 Jun 2009 20:38:06 +0200
changeset 322 c0a82115684f
parent 321 4a995e8a66ab
child 323 81fcc509bafc
Affichage plus ou moins correcte du message d'erreur de connexion
res/layout/login.xml
res/values-en/strings.xml
res/values-fr/strings.xml
src/com/beem/project/beem/ui/EditSettings.java
src/com/beem/project/beem/ui/Login.java
--- a/res/layout/login.xml	Fri Jun 26 19:55:14 2009 +0200
+++ b/res/layout/login.xml	Fri Jun 26 20:38:06 2009 +0200
@@ -6,7 +6,8 @@
 		android:layout_width="fill_parent" android:layout_height="wrap_content"
 		android:layout_marginBottom="25px" android:layout_marginTop="15px" />
 	<TextView android:id="@+id/log_as_msg" android:layout_width="fill_parent"
-		android:layout_height="wrap_content" android:gravity="center" />
+		android:layout_height="wrap_content" android:gravity="center"
+		android:textColor="#FF0000" />
 	<LinearLayout android:orientation="vertical"
 		android:layout_width="fill_parent" android:layout_height="fill_parent"
 		android:gravity="bottom">
--- a/res/values-en/strings.xml	Fri Jun 26 19:55:14 2009 +0200
+++ b/res/values-en/strings.xml	Fri Jun 26 20:38:06 2009 +0200
@@ -163,7 +163,7 @@
 	<string name="login_settings_button">Settings</string>
 	<string name="login_login_button">Log in</string>
 	<string name="login_login_progress">Connecting. Please wait...</string>
-	
+	<string name="login_error_msg">Unfortunately, an error occured.\n\nError detail:\n%s</string>
 	
 	<!--
 		EditSettings Activity
--- a/res/values-fr/strings.xml	Fri Jun 26 19:55:14 2009 +0200
+++ b/res/values-fr/strings.xml	Fri Jun 26 20:38:06 2009 +0200
@@ -158,6 +158,7 @@
 	<string name="login_settings_button">Param├Ętres</string>
 	<string name="login_login_button">Connexion</string>
 	<string name="login_login_progress">Connexion en cours. Veuillez patienter...</string>	
+	<string name="login_error_msg">Malheureusement, une erreur est survenu.\n\nD├ętail de l\'erreur :\n%s</string>
 	
 	<!--
 		EditSettings Activity
--- a/src/com/beem/project/beem/ui/EditSettings.java	Fri Jun 26 19:55:14 2009 +0200
+++ b/src/com/beem/project/beem/ui/EditSettings.java	Fri Jun 26 20:38:06 2009 +0200
@@ -264,7 +264,6 @@
 	proxyPortField = (EditText) findViewById(R.id.settings_proxy_port);
 	proxyUsernameField = (EditText) findViewById(R.id.settings_proxy_username);
 	proxyPasswordField = (EditText) findViewById(R.id.settings_proxy_password);
-	disableProxyParameters();
     }
 
     /**
--- a/src/com/beem/project/beem/ui/Login.java	Fri Jun 26 19:55:14 2009 +0200
+++ b/src/com/beem/project/beem/ui/Login.java	Fri Jun 26 20:38:06 2009 +0200
@@ -150,7 +150,7 @@
 		public void run() {
 		    Toast.makeText(Login.this, errorMsg, Toast.LENGTH_LONG).show();
 		    TextView labelError = (TextView) findViewById(R.id.log_as_msg);
-		    labelError.setText(errorMsg);
+		    labelError.setText(getString(R.string.login_error_msg, errorMsg));
 		}
 	    });
 	}