mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 11:33:06 +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() {
|
addPcButton.setOnClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
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
|
// Bind to the service which will try to add the PC
|
||||||
bindService(new Intent(AddComputerManually.this, ComputerManagerService.class), serviceConnection, Service.BIND_AUTO_CREATE);
|
bindService(new Intent(AddComputerManually.this, ComputerManagerService.class), serviceConnection, Service.BIND_AUTO_CREATE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user