diff --git a/android/sdremote/res/layout/activity_computer_creation.xml b/android/sdremote/res/layout/activity_computer_creation.xml
index be1f31395436..4ef3f86a269f 100644
--- a/android/sdremote/res/layout/activity_computer_creation.xml
+++ b/android/sdremote/res/layout/activity_computer_creation.xml
@@ -8,7 +8,7 @@
@@ -16,10 +16,18 @@
+
+
\ No newline at end of file
diff --git a/android/sdremote/res/values/dimens.xml b/android/sdremote/res/values/dimens.xml
index b73555f52401..d4c2e5b07b04 100644
--- a/android/sdremote/res/values/dimens.xml
+++ b/android/sdremote/res/values/dimens.xml
@@ -15,6 +15,7 @@
10dp
10dp
8dp
+ 16dp
12dp
8dp
diff --git a/android/sdremote/res/values/strings.xml b/android/sdremote/res/values/strings.xml
index 38252bb9a05c..072c406ea223 100644
--- a/android/sdremote/res/values/strings.xml
+++ b/android/sdremote/res/values/strings.xml
@@ -27,7 +27,7 @@
You should enable experimental features at “Tools → Options → LibreOffice → Advanced” as well.
If you have Bluetooth pairing issues check instructions related to your desktop OS.
You should type a valid IP address.
- Name should not be empty.
+ Name is optional — IP address would be used instead if you wish.
IP address
Name
diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerCreationActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerCreationActivity.java
index 76f33c6e4ccb..372e49bdb947 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerCreationActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerCreationActivity.java
@@ -68,11 +68,9 @@ public class ComputerCreationActivity extends SherlockFragmentActivity implement
public void onClick(View aView) {
if (aView.equals(getCancelButton())) {
cancelCreation();
-
return;
}
-
if (aView.equals(getSaveButton())) {
saveServer();
}
@@ -88,13 +86,13 @@ public class ComputerCreationActivity extends SherlockFragmentActivity implement
if (!isIpAddressValid(aIpAddress)) {
getIpAddressEdit().setError(getText(R.string.message_ip_address_validation));
+ return;
}
if (TextUtils.isEmpty(aName)) {
- getNameEdit().setError(getText(R.string.message_name_validation));
+ finish(aIpAddress, aIpAddress);
}
-
- if (isServerInformationValid(aIpAddress, aName)) {
+ else {
finish(aIpAddress, aName);
}
}
@@ -111,10 +109,6 @@ public class ComputerCreationActivity extends SherlockFragmentActivity implement
return (EditText) findViewById(R.id.edit_name);
}
- private boolean isServerInformationValid(String aIpAddress, String aName) {
- return isIpAddressValid(aIpAddress) && !TextUtils.isEmpty(aName);
- }
-
private boolean isIpAddressValid(String aIpAddress) {
return Patterns.IP_ADDRESS.matcher(aIpAddress).matches();
}