diff options
Diffstat (limited to 'app/src/main/res')
| -rw-r--r-- | app/src/main/res/layout/main.xml | 43 | ||||
| -rw-r--r-- | app/src/main/res/values/strings.xml | 13 |
2 files changed, 22 insertions, 34 deletions
diff --git a/app/src/main/res/layout/main.xml b/app/src/main/res/layout/main.xml index 2e722b0..0b1273b 100644 --- a/app/src/main/res/layout/main.xml +++ b/app/src/main/res/layout/main.xml @@ -44,8 +44,10 @@ </LinearLayout> - <!-- Pairing form. Fields are grouped and labelled by where their - value comes from on the target's Wireless debugging screen. --> + <!-- Pairing form. Each field is one value the target already prints, + copied verbatim: the Wireless debugging screen shows the device + address as a single "ip:port" string, and the pairing dialog adds + its own port plus the code. --> <LinearLayout style="@style/Card" android:layout_width="match_parent" @@ -67,15 +69,22 @@ style="@style/FieldLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/label_host"/> + android:text="@string/label_address"/> + + <TextView + style="@style/Caption" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sub_address"/> <EditText - android:id="@+id/host" + android:id="@+id/device_address" style="@style/Field" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="@string/host_hint" - android:inputType="text" + android:layout_marginTop="@dimen/space_xs" + android:hint="@string/address_hint" + android:inputType="textUri" android:autofillHints="postalAddress"/> <TextView @@ -120,28 +129,6 @@ </LinearLayout> - <TextView - style="@style/FieldLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/label_connect"/> - - <TextView - style="@style/Caption" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sub_connect"/> - - <EditText - android:id="@+id/connect_port" - style="@style/Field" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/space_xs" - android:hint="@string/connect_port_hint" - android:inputType="number" - android:autofillHints="off"/> - <Button android:id="@+id/pair" style="@style/Button.Primary" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a9a552c..d7c45ac 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,16 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">scrcpy</string> - <string name="host_hint">192.168.1.42</string> + <string name="address_hint">192.168.1.42:41234</string> <string name="pair_port_hint">37123</string> <string name="pair_code_hint">6 digits</string> - <string name="connect_port_hint">41234</string> <string name="pair_help">On the target: Settings > Developer options > Wireless debugging</string> - <string name="label_host">Host / IP address</string> + <string name="label_address">Device address</string> + <string name="sub_address">The “IP address & Port” on the Wireless debugging screen</string> <string name="label_pairing">Pairing port and code</string> - <string name="sub_pairing">From the “Pair device with pairing code” dialog</string> - <string name="label_connect">Connection port</string> - <string name="sub_connect">Shown on the Wireless debugging screen</string> + <string name="sub_pairing">From the “Pair device with pairing code” dialog. Same IP, different port</string> + <string name="bad_address">Enter the device address as 192.168.1.42:41234</string> + <string name="bad_pair_port">Pairing port must be a number from 1 to 65535</string> + <string name="bad_pair_code">Enter the 6-digit pairing code</string> <string name="pair_and_save">Pair and save</string> <string name="pair_a_device">Pair a device</string> <string name="saved_devices">Saved devices</string> |