void InitializeListView() { _adapter = new LeDevicesListAdapter(this); ListView list = FindViewById<ListView>(Resource.Id.device_list); list.Adapter = _adapter; list.ItemClick += (sender, e) =>{ _selectedBeacon = _adapter[e.Position]; View imgView = e.View.FindViewWithTag("beacon_image"); _quickAction.Show(imgView); }; }
protected override void OnCreate (Bundle savedInstanceState) { Xamarin.Insights.Initialize (XamarinInsights.ApiKey, this); base.OnCreate (savedInstanceState); // Set our view from the "main" layout resource SetContentView (Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it button = FindViewById<Button> (Resource.Id.myButton); button.Text = "Tap to start looking for nearby Estimote iBeacons"; button.Click += delegate { LookForBeacons (); }; //run LookForBeacons() when button is pressed //setup Estimote beacon connection instances _adapter = new LeDevicesListAdapter (this); }
protected override void OnCreate (Bundle savedInstanceState) { base.OnCreate (savedInstanceState); // Set our view from the "main" layout resource SetContentView (Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById<Button> (Resource.Id.myButton); _findAllBeacons = new FindAllBeacons(this); _findAllBeacons.BeaconsFound += NewBeaconsFound; _adapter = new LeDevicesListAdapter(this); button.Click += delegate { LookForBeacons(); button.Text = string.Format ("{0} Estimote iBeacons detected! Tap to retry.", count); }; }