From c8274d3622d68e020de899c4e16c0a4ccb94db12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Tue, 14 Feb 2012 13:40:07 +0100 Subject: same-android: Join networks from network list. --- .../src/main/java/com/orbekk/same/SameControllerActivity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'same-android/src/main/java') diff --git a/same-android/src/main/java/com/orbekk/same/SameControllerActivity.java b/same-android/src/main/java/com/orbekk/same/SameControllerActivity.java index c9829a7..59ec6e2 100644 --- a/same-android/src/main/java/com/orbekk/same/SameControllerActivity.java +++ b/same-android/src/main/java/com/orbekk/same/SameControllerActivity.java @@ -64,9 +64,10 @@ public class SameControllerActivity extends Activity { new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView parent, View view, int position, long id) { - Toast.makeText(SameControllerActivity.this, - "Join network " + networkNames.get(position), - Toast.LENGTH_SHORT).show(); + String networkName = networkNames.get(position); + int networkIndex = networkNames.indexOf(networkName); + String masterUrl = networkUrls.get(networkIndex); + joinNetwork(masterUrl); } }; -- cgit v1.2.3