From ddc96f75b3e152e7f8f791583d92798fe19da2a0 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sun, 25 Apr 2010 11:13:26 +0200 Subject: [PATCH] ServerActivity: Trim title, host, port as there are some strang on screen keyboards that append a space --- src/org/yaaic/activity/AddServerActivity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/yaaic/activity/AddServerActivity.java b/src/org/yaaic/activity/AddServerActivity.java index 742fa3a..8914718 100644 --- a/src/org/yaaic/activity/AddServerActivity.java +++ b/src/org/yaaic/activity/AddServerActivity.java @@ -249,10 +249,10 @@ public class AddServerActivity extends Activity implements OnClickListener */ private Server getServerFromView() { - String title = ((EditText) findViewById(R.id.title)).getText().toString(); - String host = ((EditText) findViewById(R.id.host)).getText().toString(); - int port = Integer.parseInt(((EditText) findViewById(R.id.port)).getText().toString()); - String password = ((EditText) findViewById(R.id.password)).getText().toString(); + String title = ((EditText) findViewById(R.id.title)).getText().toString().trim(); + String host = ((EditText) findViewById(R.id.host)).getText().toString().trim(); + int port = Integer.parseInt(((EditText) findViewById(R.id.port)).getText().toString().trim()); + String password = ((EditText) findViewById(R.id.password)).getText().toString().trim(); String charset = ((Spinner) findViewById(R.id.charset)).getSelectedItem().toString(); Boolean useSSL = ((CheckBox) findViewById(R.id.useSSL)).isChecked();