diff options
-rw-r--r-- | same-android/res/layout/controller.xml | 14 | ||||
-rw-r--r-- | same-android/src/main/java/com/orbekk/SameControllerActivity.java | 4 |
2 files changed, 10 insertions, 8 deletions
diff --git a/same-android/res/layout/controller.xml b/same-android/res/layout/controller.xml index c3c4717..6cfea80 100644 --- a/same-android/res/layout/controller.xml +++ b/same-android/res/layout/controller.xml @@ -6,33 +6,35 @@ > <TextView - android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Commands" android:textAppearance="?android:attr/textAppearanceLarge" /> <Button - android:id="@+id/button1" android:layout_width="match_parent" android:layout_height="wrap_content" android:onClick="createNetwork" android:text="Create" /> <EditText - android:id="@+id/editText1" + android:id="@+id/master_service_url" android:layout_width="match_parent" android:layout_height="wrap_content" /> <Button - android:id="@+id/button2" android:layout_width="match_parent" android:layout_height="wrap_content" android:onClick="joinNetwork" - android:text="Search" /> + android:text="Join" /> + + <ListView + android:id="@+id/network_list" + android:layout_width="match_parent" + android:layout_height="wrap_content" > + </ListView> <Button - android:id="@+id/button3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="doneClicked" diff --git a/same-android/src/main/java/com/orbekk/SameControllerActivity.java b/same-android/src/main/java/com/orbekk/SameControllerActivity.java index fb9b103..76e6416 100644 --- a/same-android/src/main/java/com/orbekk/SameControllerActivity.java +++ b/same-android/src/main/java/com/orbekk/SameControllerActivity.java @@ -30,7 +30,7 @@ public class SameControllerActivity extends Activity { Intent intent = new Intent(this, SameService.class); intent.setAction("join"); // InetAddress address = new Broadcaster(this).getBroadcastAddress(); - EditText t = (EditText)findViewById(R.id.editText1); + EditText t = (EditText)findViewById(R.id.master_service_url); intent.putExtra("masterUrl", t.getText().toString()); startService(intent); } @@ -42,7 +42,7 @@ public class SameControllerActivity extends Activity { } private void showBroadcastAddress() { - EditText t = (EditText)findViewById(R.id.editText1); + EditText t = (EditText)findViewById(R.id.master_service_url); t.setText(new Broadcaster(this).getBroadcastAddress().getHostAddress()); } |