title: ListView not saving changes after updating its screen
body: <p>every time i update my screen (change rotation or leave the screen and then go back to it) it doesn't save the updated list and i go back to the default list. thank you in advance &lt;3
  MovieActivity:</p>
  <pre><code>public class MovieActivity : Activity, ListView.IOnItemClickListener, Android.Views.View.IOnClickListener, ListView.IOnItemLongClickListener
  {
     public static List&lt;Movie&gt; movieList { get; set; }
      MovieAdapter movieAdapter;
      ListView lv;
      Button btnAdd;
      protected override void OnCreate(Bundle savedInstanceState)
      {
          base.OnCreate(savedInstanceState);
          SetContentView(Resource.Layout.movie_page);
          // Create your application here
          btnAdd = FindViewById&lt;Button&gt;(Resource.Id.btnAdd);
         Bitmap vannila_sky_pic = Android.Graphics.BitmapFactory.DecodeResource(Application.Context.Resources, Resource.Drawable.Vanilla_Sky);
          Bitmap jimmyneutron_pic = Android.Graphics.BitmapFactory.DecodeResource(Application.Context.Resources, Resource.Drawable.Jimmy_Neutron_Boy_Genius_film);
          Movie m1 = new Movie(90, &quot;Vanilla Sky&quot;, &quot;James&quot;, vannila_sky_pic);
          Movie m2 = new Movie(124, &quot;jimmy neutron&quot;, &quot;arthur&quot;, jimmyneutron_pic);
       movieList = new System.Collections.Generic.List&lt;Movie&gt;();
          movieList.Add(m1);
          movieList.Add(m2);
          movieAdapter = new MovieAdapter(this, movieList);
          lv = FindViewById&lt;ListView&gt;(Resource.Id.lv);
          lv.Adapter = movieAdapter;
          lv.OnItemClickListener = this;
          lv.OnItemLongClickListener = this;
          btnAdd.SetOnClickListener(this);
      }
      protected override void OnResume()
      {
          base.OnResume();
          if (movieAdapter != null)
          {
              movieAdapter.NotifyDataSetChanged();
          }
      }
      public void OnItemClick(AdapterView parent, View view, int position, long id)
      {
          Intent intent = new Intent(this, typeof(EditMovieActivity));
          Movie temp = MovieActivity.movieList[position];
          intent.PutExtra(&quot;pos&quot;, position);
          StartActivity(intent);
          
      }
  
      public void OnClick(View v)
      {
          if(v == btnAdd)
          {
              Intent intent = new Intent(this, typeof(EditMovieActivity));
              StartActivity(intent);
              
          }
      }
  
      public bool OnItemLongClick(AdapterView parent, View view, int position, long id)
      {
          MovieActivity.movieList.RemoveAt(position);
          movieAdapter.NotifyDataSetChanged();
          return true;
      }
  }
  </code></pre>
  <p>EditMovieActivity:` public class EditMovieActivity : Activity, Android.Views.View.IOnClickListener
  {
  Button btnSave, btnAddPic;</p>
  <pre><code>    EditText etTitle, etDirector, etAvg, etLength;
  
      Bitmap bitmap;
      int pos = -1;
      ImageView iv;
      protected override void OnCreate(Bundle savedInstanceState)
      {
          base.OnCreate(savedInstanceState);
          SetContentView(Resource.Layout.edit_movie);
          iv = FindViewById&lt;ImageView&gt;(Resource.Id.ivMovie);
          btnSave = FindViewById&lt;Button&gt;(Resource.Id.btnSave);
          btnAddPic = FindViewById&lt;Button&gt;(Resource.Id.btnAddPic);
          etTitle = FindViewById&lt;EditText&gt;(Resource.Id.etTitle);
          etDirector = FindViewById&lt;EditText&gt;(Resource.Id.etDirector);
          etAvg = FindViewById&lt;EditText&gt;(Resource.Id.etAvg);
          etLength = FindViewById&lt;EditText&gt;(Resource.Id.etLength);
          pos = Intent.GetIntExtra(&quot;pos&quot;, -1);//-1 is default
          btnAddPic.SetOnClickListener(this);
          btnSave.SetOnClickListener(this);
          if (pos != -1)// update 
          {
              Movie temp = MovieActivity.movieList[pos];
              Toast.MakeText(this, &quot;position is  &quot; + pos, ToastLength.Long).Show();
              etTitle.Text = temp.getTitle();
              etDirector.Text = temp.getDirector();
              etAvg.Text = &quot;&quot; + temp.getAvg();
              etLength.Text = &quot;&quot; + temp.getLength();
              bitmap = temp.getBitmap();
              iv.SetImageBitmap(temp.getBitmap());
          }
          else // new movie
          {
              Toast.MakeText(this, &quot;lets add new item &quot;, ToastLength.Long).Show();
          }
      }
      public void OnClick(View v)
      {
          if (v == btnAddPic)
          {
              Intent intent = new Intent(Android.Provider.MediaStore.ActionImageCapture);
              StartActivityForResult(intent, 0);
          }
          else
              if (v == btnSave)
          {
              int length = int.Parse(etLength.Text);
              int avg = int.Parse(etAvg.Text);
              string title = etTitle.Text;
              string director = etDirector.Text;
              Movie m = null;
              if (pos != -1)//updates
              {
                  m = new Movie(length, title, director, bitmap);
                  MovieActivity.movieList[pos] = m;
                  Finish();
              }
              else// adds new movie
              {
                  m = new Movie(length, title, director, bitmap);
                  MovieActivity.movieList.Add(m);
                  Finish();
              }
          }
      }
      protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
      {
          base.OnActivityResult(requestCode, resultCode, data);
          if (requestCode == 0)//coming from camera
          {
              if (resultCode == Result.Ok)
              {
                  bitmap = (Android.Graphics.Bitmap)data.Extras.Get(&quot;data&quot;);
                  iv.SetImageBitmap(bitmap);
              }
          }
      }
  }`
  </code></pre>
  <p>Movie:</p>
  <pre><code> public class Movie
  {
      private int length;
      private string title;
      private string director;
      private int avg;
      private Android.Graphics.Bitmap bitmap;
      public Movie(int length, string title, string director,Android.Graphics.Bitmap bitmap )
      {
          this.length = length;
          this.title = title;
          this.director = director;
          this.avg = 0;
          this.bitmap = bitmap;
  
      }
      public void setBitmap(Android.Graphics.Bitmap bitmap)
      {
          this.bitmap = bitmap;
      }
      public Android.Graphics.Bitmap getBitmap()
      {
          return bitmap;
      }
      public void setAvg(int avg)
      {
          this.avg = avg;
      }
      public int getAvg()
      {
          return avg;
      }
      public void setDirector(string director)
      {
          this.director = director;
      }
      public string getDirector()
      {
          return director;
      }
      public void setTitle(string title)
      {
          this.title = title;
      }
      public string getTitle()
      {
          return title;
      }
      public void setLength(int length)
      {
          this.length = length;
      }
      public int getLength()
      {
          return length;
      }
  
  }
  </code></pre>
  <p>MovieAdapter:</p>
  <pre><code>class MovieAdapter:BaseAdapter&lt;Movie&gt;
  {
      Android.Content.Context context;
      List&lt;Movie&gt; objects;
      
      public MovieAdapter(Android.Content.Context context, System.Collections.Generic.List&lt;Movie&gt; objects)
      {
          this.context = context;
          this.objects = objects;
      }
  
      public List&lt;Movie&gt; GetList()
      {
          return this.objects;
      }
  
      public override long GetItemId(int position)
      {
          return position;
      }
      public override int Count
      {
          get { return this.objects.Count; }
      }
  
      public override Movie this[int position]
      {
          get { return this.objects[position]; }
      }
  
      public override View GetView(int position, View convertView, ViewGroup parent)
      {
          Android.Views.LayoutInflater layoutInflater = ((MovieActivity)context).LayoutInflater;
          Android.Views.View view = layoutInflater.Inflate(Resource.Layout.movie_layoutxml, parent, false);
          TextView tvTitle = view.FindViewById&lt;TextView&gt;(Resource.Id.tvTitle);
          TextView tvDirector = view.FindViewById&lt;TextView&gt;(Resource.Id.tvDirector);
          TextView tvLength = view.FindViewById&lt;TextView&gt;(Resource.Id.tvlength);
          TextView tvAvg = view.FindViewById&lt;TextView&gt;(Resource.Id.tvAvg);
          ImageView ivCover = view.FindViewById&lt;ImageView&gt;(Resource.Id.ivCover);
          Movie temp = objects[position];
          if(temp != null)
          {
              ivCover.SetImageBitmap(temp.getBitmap());
              tvAvg.Text = &quot;&quot; + temp.getAvg();
              tvTitle.Text = temp.getTitle();
              tvLength.Text =&quot;&quot; + temp.getLength();
              tvDirector.Text = temp.getDirector();
          }
          return view;
      }
  }
  </code></pre>