title: Programmatically Add/Remove items to/from custom listview?
body: <p>I'm creating a custom list view that is able to add or remove items. I try this code to add a new row item to list view but it says "The method add(String) is undefined for the type ListView".</p>
  
  <p>This is my code:</p>
  
  <pre><code>public class AddActivityCustomList extends ArrayAdapter&lt;String&gt; {
  
      private final Activity context;
      private final String[] web;
  
      public AddActivityCustomList(Activity context, String[] web) {
          super(context, R.layout.add_activity_single_list, web);
          this.context = context;
          this.web = web;
  
      }
  
      public View getView(final int position, View view, ViewGroup parent) {
          LayoutInflater inflater = context.getLayoutInflater();
          View rowView = inflater.inflate(R.layout.add_activity_single_list,
                  null, true);
          TextView txtTitle = (TextView) rowView
                  .findViewById(R.id.act_title_single);
  
          txtTitle.setTypeface(myface);
          txtTitle.setText(web[position]);
  
          return rowView;
  
      }
  </code></pre>
  
  <p>And my Add Button code is this:</p>
  
  <pre><code>add_activity.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View arg0) {
                  // TODO Auto-generated method stub
                  lv.add(add_act_title.getText().toString());
                  add_act_title.setText("");
                  adapter.notifyDataSetChanged();
                  add_act_title.getText();
              }
          });
  </code></pre>
  
  <p>that has problem in <code>lv.add(...</code>part.What should I do?</p>