title: add Item to custom ListView with custom custom Adapter
body: <p>I have a custom Adapter (ArrayAdapter) and i want to add items dynamically in Code.</p>
  
  <p>My ArrayAdapter looks like this:</p>
  
  <pre><code>import android.app.Activity;
  import android.content.Context;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ArrayAdapter;
  import android.widget.TextView;
  
  public class ChatList extends ArrayAdapter&lt;ChatListItem&gt; {
  
  Context context;
  int layoutResourceId;
  ChatListItem data[] = null;
  
  public ChatList(Context context, int layoutResourceId, ChatListItem[] data) {
      super(context, layoutResourceId, data);
      this.layoutResourceId = layoutResourceId;
      this.context = context;
      this.data = data;
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      View row = convertView;
      ChatHolder holder = null;
      ChatListItem entry = data[position];
  
      if (row == null) {
          LayoutInflater inflater = ((Activity) context).getLayoutInflater();
          row = inflater.inflate(layoutResourceId, parent, false);
  
          holder = new ChatHolder();
          holder.txtText = (TextView) row.findViewById(R.id.txtText);
          holder.txtUser = (TextView) row.findViewById(R.id.txtUser);
          holder.txtVersion = (TextView) row.findViewById(R.id.txtVersion);
          holder.txtZeit = (TextView) row.findViewById(R.id.txtZeit);
  
          row.setTag(holder);
  
      } else {
          holder = (ChatHolder) row.getTag();
      }
  
      holder.txtText.setText(entry.text);
      holder.txtUser.setText(entry.user);
      holder.txtVersion.setText(entry.v);
      holder.txtZeit.setText(entry.time);
  
      return row;
  }
  
  static class ChatHolder {
      TextView txtText;
      TextView txtUser;
      TextView txtVersion;
      TextView txtZeit;
  }
  }
  </code></pre>
  
  <p>And i want to add items in this Code:</p>
  
  <pre><code>LoadChatData bdl = new LoadChatData(new OnTaskComplete() {
                  @Override
                  public void onTaskCompleted(ChatListItem[] url, int id) {
                      currid = id;
                      for (ChatListItem i : url) {
                          if (chatList != null) {
                              chatList.add(i);
                          }
                      }
                  }
              });
  </code></pre>
  
  <p>Is there a way to do that? The problem is i am getting this Error Message:</p>
  
  <pre><code>02-16 11:17:57.287: W/System.err(24997): java.lang.UnsupportedOperationException
  02-16 11:17:57.287: W/System.err(24997):    at java.util.AbstractList.add(AbstractList.java:404)
  02-16 11:17:57.287: W/System.err(24997):    at java.util.AbstractList.add(AbstractList.java:425)
  02-16 11:17:57.287: W/System.err(24997):    at android.widget.ArrayAdapter.add(ArrayAdapter.java:179)
  02-16 11:17:57.287: W/System.err(24997):    at de.tecfriends.vbtsplash2013.ActivityNewChat$3$1.onTaskCompleted(ActivityNewChat.java:108)
  02-16 11:17:57.287: W/System.err(24997):    at de.tecfriends.vbtsplash2013.LoadChatData.doInBackground(LoadChatData.java:45)
  02-16 11:17:57.287: W/System.err(24997):    at de.tecfriends.vbtsplash2013.LoadChatData.doInBackground(LoadChatData.java:1)
  02-16 11:17:57.287: W/System.err(24997):    at android.os.AsyncTask$2.call(AsyncTask.java:287)
  02-16 11:17:57.287: W/System.err(24997):    at java.util.concurrent.FutureTask.run(FutureTask.java:234)
  02-16 11:17:57.287: W/System.err(24997):    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
  02-16 11:17:57.287: W/System.err(24997):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
  02-16 11:17:57.287: W/System.err(24997):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
  02-16 11:17:57.287: W/System.err(24997):    at java.lang.Thread.run(Thread.java:856)
  </code></pre>