private void Wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
 {
     lstLocation = JsonConvert.DeserializeObject <List <Location> >(e.Result);
     //Toast.MakeText(this, "completed", ToastLength.Short).Show();
     adapter            = new AdapterLocation(this, lstLocation);
     lvLocation.Adapter = adapter;
 }
示例#2
0
            public ViewHolder(View itemView, Action <int> listener)
                : base(itemView)
            {
                this.LocationName        = itemView.FindViewById <TextView>(Resource.Id.textviewLocationsAdapterName);
                this.LocationAddress     = itemView.FindViewById <TextView>(Resource.Id.textviewLocationAdapterAddress);
                this.LocationDescription = itemView.FindViewById <TextView>(Resource.Id.textviewLocationAdapterDescription);
                this.AdapterLocation     = itemView.FindViewById <LinearLayout>(Resource.Id.linearLayoutLocationsAdapter);

                itemView.Click += (sender, e) => {
                    AdapterLocation.SetBackgroundColor(Android.Graphics.Color.Orange);
                    listener(this.LayoutPosition);
                };
            }