mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 03:23:07 +00:00
Warn the user if they've entered nothing to add
This commit is contained in:
parent
6f6eb1fb95
commit
b79fd8860c
@ -86,7 +86,12 @@ public class AddComputerManually extends Activity {
|
||||
addPcButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Toast.makeText(AddComputerManually.this, "Adding PC...", Toast.LENGTH_LONG).show();
|
||||
if (hostText.getText().length() == 0) {
|
||||
Toast.makeText(AddComputerManually.this, "You must enter an IP address", Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
|
||||
Toast.makeText(AddComputerManually.this, "Adding PC...", Toast.LENGTH_SHORT).show();
|
||||
|
||||
// Bind to the service which will try to add the PC
|
||||
bindService(new Intent(AddComputerManually.this, ComputerManagerService.class), serviceConnection, Service.BIND_AUTO_CREATE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user