Code example for ArrayAdapter

Methods: add

0
      listener.onFeedSelected(adapter.getItem(position));
    } 
  } 
   
  public void addNewFeed(Feed feed) {
    adapter.add(feed);
  } 
 
  private void loadFeeds() { 
    adapter=new ArrayAdapter<Feed>(getActivity(), R.layout.row,
                                    Feed.getFeeds()); 
    setListAdapter(adapter);
  } 
   
  public void setOnFeedListener(OnFeedListener listener) {
    this.listener=listener;
  } 
   
  public interface OnFeedListener { 
    void onFeedSelected(Feed feed);
Contextual code suggestions in your IDE  Get Codota for Java