AddServerActivity: Disable auto-correction for the hostname field. Fixes #99.

This commit is contained in:
Sebastian Kaspari 2012-01-21 10:33:03 +01:00
parent 6ff79ee50d
commit 8386f4a1ef
1 changed files with 11 additions and 5 deletions

View File

@ -49,7 +49,7 @@ import android.widget.Toast;
/**
* Add a new server to the list
*
*
* @author Sebastian Kaspari <sebastian@yaaic.org>
*/
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