title: how to populate date from webservice to xamarin android
body: <p>I can't populate date from webservice to xamarin android</p>
  
  <pre><code>namespace Printopack
  {
    [Activity(Label = "Mainlistview", Icon = "@drawable/icon")]
    public class Mainlistview : Activity
    {
      protected override void OnCreate(Bundle bundle)
      {
          base.OnCreate(bundle);
  
          SetContentView(Resource.Layout.Mainlistview);
  
          ListView ListView = FindViewById&lt;ListView&gt;(Resource.Id.listView1);
          Selling.WebServiceDB ws = new Selling.WebServiceDB();
          ws.OrderStatusListCompleted += Ws_OrderStatusListCompleted;
          ws.OrderStatusListAsync(Convert.ToString(1));
      }
  
      private void Ws_OrderStatusListCompleted(object sender, Selling.OrderStatusListCompletedEventArgs e)
      {
          ListView ListView = FindViewById&lt;ListView&gt;(Resource.Id.listView1);
          string msg = "";
  
          if (e.Result.ToString().Equals("0"))
          {
              msg = e.Result.ToString();
          }
          else
          {
              // full class
              List&lt;TableItem&gt; tableItems = new List&lt;TableItem&gt;();
              tableItems.Add(new TableItem("" + e.Result, "" + e.Result, Resource.Drawable.Icon));
  
              ListView.Adapter = new HomeScreenAdapter(this, tableItems);
          }
      }
  
      // adpater manage
      public class HomeScreenAdapter : BaseAdapter&lt;TableItem&gt;
      {
          List&lt;TableItem&gt; items;
          Activity context;
          public HomeScreenAdapter(Activity context, List&lt;TableItem&gt; items)
              : base()
          {
              this.context = context;
              this.items = items;
          }
          public override long GetItemId(int position)
          {
              return position;
          }
          public override TableItem this[int position]
          {
              get { return items[position]; }
          }
          public override int Count
          {
              get { return items.Count; }
          }
          public override View GetView(int position, View convertView, ViewGroup parent)
          {
              var item = items[position];
              View view = convertView;
              if (view == null) // no view to re-use, create new
                  view = context.LayoutInflater.Inflate(Resource.Layout.Ticket_News, null);
              view.FindViewById&lt;TextView&gt;(Resource.Id.Text1).Text = item.Heading;
              view.FindViewById&lt;TextView&gt;(Resource.Id.Text2).Text = item.SubHeading;
              view.FindViewById&lt;ImageView&gt;(Resource.Id.Image).SetImageResource(item.ImageResourceId);
              return view;
          }
      }
  
      public class TableItem
      {
          public string Heading;
          public string SubHeading;
          public int ImageResourceId;
          public TableItem(string Heading, string SubHeading, int ImageResourceId)
          {
              this.Heading = Heading;
              this.SubHeading = SubHeading;
              this.ImageResourceId = ImageResourceId;
          }
        }
    }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/yMK7P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yMK7P.png" alt="enter image description here"></a></p>