From 8386f4a1ef02e29d08e6b46139a3d778878ac412 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sat, 21 Jan 2012 10:33:03 +0100 Subject: [PATCH] AddServerActivity: Disable auto-correction for the hostname field. Fixes #99. --- .../org/yaaic/activity/AddServerActivity.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/application/src/org/yaaic/activity/AddServerActivity.java b/application/src/org/yaaic/activity/AddServerActivity.java index 24770af..d862674 100644 --- a/application/src/org/yaaic/activity/AddServerActivity.java +++ b/application/src/org/yaaic/activity/AddServerActivity.java @@ -49,7 +49,7 @@ import android.widget.Toast; /** * Add a new server to the list - * + * * @author Sebastian Kaspari */ public class AddServerActivity extends Activity implements OnClickListener @@ -126,6 +126,12 @@ public class AddServerActivity extends Activity implements OnClickListener } } + // Disable suggestions for host name + if (android.os.Build.VERSION.SDK_INT >= 5) { + EditText serverHostname = (EditText) findViewById(R.id.host); + serverHostname.setInputType(0x80000); + } + Uri uri = getIntent().getData(); if (uri != null && uri.getScheme().equals("irc")) { // handling an irc:// uri @@ -302,7 +308,7 @@ public class AddServerActivity extends Activity implements OnClickListener /** * Populate a server object from the data in the view - * + * * @return The server object */ private Server getServerFromView() @@ -331,7 +337,7 @@ public class AddServerActivity extends Activity implements OnClickListener /** * Populate an identity object from the data in the view - * + * * @return The identity object */ private Identity getIdentityFromView() @@ -352,7 +358,7 @@ public class AddServerActivity extends Activity implements OnClickListener /** * Validate the input for a server - * + * * @throws ValidationException */ private void validateServer() throws ValidationException @@ -394,7 +400,7 @@ public class AddServerActivity extends Activity implements OnClickListener /** * Validate the input for a identity - * + * * @throws ValidationException */ private void validateIdentity() throws ValidationException