Code example for ArrayAdapter

Methods: getItem

0
  public void onListItemClick(ListView l, View v, int position,
                              long id) {
    super.onListItemClick(l, v, position, id);
     
    if (listener!=null) {
      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;