From ceb957e7f3c591963545288e8dce6bed397a1f94 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 26 Mar 2014 00:13:46 -0400 Subject: [PATCH] Add a toast if the IP field isn't filled --- src/com/limelight/Connection.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/com/limelight/Connection.java b/src/com/limelight/Connection.java index 2b65e5b3..ca11e89e 100644 --- a/src/com/limelight/Connection.java +++ b/src/com/limelight/Connection.java @@ -163,6 +163,11 @@ public class Connection extends Activity { this.statusButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { + if (Connection.this.hostText.getText().length() == 0) { + Toast.makeText(Connection.this, "Please enter the target PC's IP address in the text box at the top of the screen.", Toast.LENGTH_LONG).show(); + return; + } + Intent intent = new Intent(Connection.this, Game.class); intent.putExtra("host", Connection.this.hostText.getText().toString()); Connection.this.startActivity(intent);