1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-22 17:02:21 -05:00

ServerActivity: Trim title, host, port as there are some strang on screen keyboards that append a space

This commit is contained in:
Sebastian Kaspari 2010-04-25 11:13:26 +02:00
parent 56204e1125
commit ddc96f75b3

View File

@ -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();