title: Updating the list view when the adapter data changes, in visual-studio android sdk
body: <p>My Listview with Adapter and collection of items in visual studio xamarine android sdk (native UI) does not get updated when items changes.
  I' m using the following code to have a list of items in visual-studio-xamarine. it seems to work, except that the list is not updated when an item is altered, added or deleted to the collection. </p>
  
  <p>Should I follow a different approach? What needs to be done so that the listview listens for items changes?</p>
  
  <p><strong>My custom adapter</strong></p>
  
  <pre><code>public class TableItemAdapter : BaseAdapter&lt;Table&gt;
  {
      List&lt;Table&gt; items;
      Activity context;
  
      public TableItemAdapter(Activity context, IEnumerable&lt;Table&gt; items) : base() {
          this.context = context;
          this.items = items.ToList();
      }
  
      public override View GetView(int position, View convertView, ViewGroup parent)
      {
          View view = convertView;        // re-use an existing view, if one is available
          if (view == null)               // otherwise create a new one
              view = context.LayoutInflater.Inflate(Resource.Layout.TableListItem, null);
  
          var tableName = view.FindViewById&lt;TextView&gt;(Resource.Id.tvTableName);
          tableName.Text = items[position].TABLE_NAME;
          tableName.SetTextColor(items[position].tableColor);
  
          view.FindViewById&lt;TextView&gt;(Resource.Id.tvTableDetail).Text = items[position].Rest;
          return view;
      }
  
      public override long GetItemId(int position) { return position; }
      public override Table this[int position] { get { return items[position]; } }
      public override int Count { get { return items.Count; } }
  }
  </code></pre>
  
  <p><strong>TableListItem.xml</strong></p>
  
  <pre><code>&lt;RelativeLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/RelativeLayout01" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent"
      android:padding="10dp" &gt;
  
  &lt;TextView 
      android:id="@+id/tvTableName"
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:textSize="20sp" /&gt;
  
  &lt;TextView 
      android:id="@+id/tvTableDetail"
      android:layout_width="match_parent" 
      android:layout_height="wrap_content"
      android:layout_toRightOf="@+id/tvTableName"
      android:gravity="right"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong>c#</strong></p>
  
  <pre><code>private ObservableCollection&lt;Table&gt; tables = new ObservableCollection&lt;Table&gt;();
  fillTablesWithObjects(tables); // adding items to collection
  
  listView = FindViewById&lt;ListView&gt;(Resource.Id.lvTables);
  var lvAdapter = new TableItemAdapter(this, tables);
  listView.Adapter = lvAdapter;
  
  // when adding or altering tables, nothing happens to listview
  tables.Add(new Table() { Name = "Table A1" });
  </code></pre>
  
  <p><code>NotifyDataSetChanged</code>, <code>listView.listSource</code>, etc do not seem to be xamarine android sdk, which is what I need.</p>