title: ListView onClick Button (Android Xamarin)
body: <p>My problem currently is I am unable to change activity the error is "System.NullReferenceException: Object reference not set to an instance of an object"</p>
  
  <p>My second problem is the method of making that ListView (is because I have a viewpager linked with it, on my drawerLayout). By doing that, I only have one button ID which eventually added with 2 or more items "Add, Delete, etc etc". So even if I do an onclick event. Both button on the listview will come out the same activity. So I need the items I added to be separated and able to do different function.</p>
  
  <p>My activity and declarations(not full code)</p>
  
  <pre><code>public class HomepageActivity : FragmentActivity
      {
          DrawerLayout mDrawerLayout;
          List&lt;string&gt; mLeftItems1 = new List&lt;string&gt;();
          ArrayAdapter mLeftAdapter1, mLeftAdapter2;
          ListView mListView;
  
  mLeftItems1.Add("Add"); 
  mLeftItems1.Add("Delete"); 
  mLeftAdapter1 = new ArrayAdapter(this, Resource.Layout.layout1, Resource.Id.button1, mLeftItems1); 
  mListView.Adapter = mLeftAdapter1;
  
  button1.Click += delegate
  {
  StartActivity(typeof(Login));
  };
  </code></pre>
  
  <p>My axml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:minWidth="25px"
      android:minHeight="25px"&gt;
      &lt;Button
          android:text="Button"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/button1"
          android:textColor="@android:color/background_dark"
          android:textSize="35dp"
          android:clickable="true" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>