title: Android- ArrayAdapter in listview not refreshing
body: <p>I currently have a listview with utilizes an ArrayAdapter. I start off with no data and dynamically add data to it using user input. For some reason, when I call <code>adapter.notifyDataSetChanged()</code> the list view does not refresh. I have for test purposes added some basic data before it and it does simply, therefore the adapter is working correctly. This is the first time implementing my own adapter so i am not sure if i am doing something wrong or not. Thanks. Code below.</p>
  
  <p>My Adapter: </p>
  
  <pre><code>public class FeedListviewAdapter extends ArrayAdapter&lt;FeedPostingLayout&gt; {
      // add the feed posting layout
      ArrayList&lt;FeedPostingLayout&gt; postingLayout;
  
      public FeedListviewAdapter(Context context, int textViewResourceId,
              ArrayList&lt;FeedPostingLayout&gt; postingLayout) {
          super(context, textViewResourceId, postingLayout);
          this.postingLayout = postingLayout;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          View view = convertView;
          if (view == null) {
              LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              view = vi.inflate(R.layout.post_layout, null);
          }
  
          FeedPostingLayout layout = postingLayout.get(position);
          if (layout != null) {
              TextView post = (TextView) view.findViewById(R.id.postTextView);
              TextView time = (TextView) view
                      .findViewById(R.id.postTimeTextView);
  
              if (post != null) {
                  post.setText(layout.feedPost);
              }
  
              if (time != null) {
                  time.setText(layout.feedTime);
              }
          }
  
          return view;
      }
  
  }
  </code></pre>
  
  <p>Where I create a new array, add it to my data, and then refresh adapter:</p>
  
  <pre><code>FeedPostingLayout test = new FeedPostingLayout(post, currentTimePost);
          data.add(test);
          feedAdapter.notifyDataSetChanged();
  </code></pre>
  
  <p>Thanks. </p>