title: notifyDataSetChanged not working on RecyclerView
body: <p>I am getting data from server and then parsing it and storing it in a List. I am using this list for the RecyclerView's adapter. I am using Fragments. </p>
  
  <p>I am using a Nexus 5 with KitKat. I am using support library for this. Will this make a difference?</p>
  
  <p>Here is my code: (Using dummy data for the question)</p>
  
  <p>Member Variables:</p>
  
  <pre><code>List&lt;Business&gt; mBusinesses = new ArrayList&lt;Business&gt;();
  
  RecyclerView recyclerView;
  RecyclerView.LayoutManager mLayoutManager;
  BusinessAdapter mBusinessAdapter;
  </code></pre>
  
  <p>My <code>onCreateView()</code>:</p>
  
  <pre><code>@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
  
      // Getting data from server
      getBusinessesDataFromServer();
  
      View view = inflater.inflate(R.layout.fragment_business_list,
              container, false);
      recyclerView = (RecyclerView) view
              .findViewById(R.id.business_recycler_view);
      recyclerView.setHasFixedSize(true);
  
      mLayoutManager = new LinearLayoutManager(getActivity());
      recyclerView.setLayoutManager(mLayoutManager);
  
      mBusinessAdapter = new BusinessAdapter(mBusinesses);
      recyclerView.setAdapter(mBusinessAdapter);
  
      return view;
  }
  </code></pre>
  
  <p>After getting data from server, <code>parseResponse()</code> is called.</p>
  
  <pre><code>protected void parseResponse(JSONArray response, String url) {
      // insert dummy data for demo
  
      mBusinesses.clear();
  
      Business business;
  
      business = new Business();
      business.setName("Google");
      business.setDescription("Google HeadQuaters");
      mBusinesses.add(business);
  
      business = new Business();
      business.setName("Yahoo");
      business.setDescription("Yahoo HeadQuaters");
      mBusinesses.add(business);
  
      business = new Business();
      business.setName("Microsoft");
      business.setDescription("Microsoft HeadQuaters");
      mBusinesses.add(business);
  
      Log.d(Const.DEBUG, "Dummy Data Inserted\nBusinesses Length: "
              + mBusinesses.size());
  
      mBusinessAdapter = new BusinessAdapter(mBusinesses);
      mBusinessAdapter.notifyDataSetChanged();
  }
  </code></pre>
  
  <p>My BusinessAdapter:</p>
  
  <pre><code>public class BusinessAdapter extends
      RecyclerView.Adapter&lt;BusinessAdapter.ViewHolder&gt; {
  
      private List&lt;Business&gt; mBusinesses = new ArrayList&lt;Business&gt;();
  
      // Provide a reference to the type of views that you are using
      // (custom viewholder)
      public static class ViewHolder extends RecyclerView.ViewHolder {
          public TextView mTextViewName;
          public TextView mTextViewDescription;
          public ImageView mImageViewLogo;
  
          public ViewHolder(View v) {
              super(v);
              mTextViewName = (TextView) v
                      .findViewById(R.id.textView_company_name);
              mTextViewDescription = (TextView) v
                      .findViewById(R.id.textView_company_description);
              mImageViewLogo = (ImageView) v
                      .findViewById(R.id.imageView_company_logo);
          }
      }
  
      // Provide a suitable constructor (depends on the kind of dataset)
      public BusinessAdapter(List&lt;Business&gt; myBusinesses) {
  
          Log.d(Const.DEBUG, "BusinessAdapter -&gt; constructor");
  
          mBusinesses = myBusinesses;
      }
  
      // Create new views (invoked by the layout manager)
      @Override
      public BusinessAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,
              int viewType) {
  
          Log.d(Const.DEBUG, "BusinessAdapter -&gt; onCreateViewHolder()");
  
          // create a new view
          View v = LayoutInflater.from(parent.getContext()).inflate(
                  R.layout.item_business_list, parent, false);
  
          ViewHolder vh = new ViewHolder(v);
          return vh;
      }
  
      // Replace the contents of a view (invoked by the layout manager)
      @Override
      public void onBindViewHolder(ViewHolder holder, int position) {
          // - get element from your dataset at this position
          // - replace the contents of the view with that element
  
          Log.d(Const.DEBUG, "BusinessAdapter -&gt; onBindViewHolder()");
  
          Business item = mBusinesses.get(position);
          holder.mTextViewName.setText(item.getName());
          holder.mTextViewDescription.setText(item.getDescription());
          holder.mImageViewLogo.setImageResource(R.drawable.ic_launcher);
  
      }
  
      // Return the size of your dataset (invoked by the layout manager)
      @Override
      public int getItemCount() {
  
          Log.d(Const.DEBUG, "BusinessAdapter -&gt; getItemCount()");
  
          if (mBusinesses != null) {
              Log.d(Const.DEBUG, "mBusinesses Count: " + mBusinesses.size());
              return mBusinesses.size();
          }
          return 0;
      }
  }
  </code></pre>
  
  <p>But I don't get the data displayed in the view. What am I doing wrong?</p>
  
  <p>Here is my log,</p>
  
  <pre><code>07-14 21:15:35.669: D/xxx(2259): Dummy Data Inserted
  07-14 21:15:35.669: D/xxx(2259): Businesses Length: 3
  07-14 21:26:26.969: D/xxx(2732): BusinessAdapter -&gt; constructor
  </code></pre>
  
  <p>I don't get any logs after this. Shouldn't <code>getItemCount()</code> in adapter should be called again?</p>