title: issue in json array length and recyclerview
body: <p>I'm getting json datas and pass it to Recyclerview. My recyclerview sholud be 2 rows and 2 rows (totally 4 items). But my json datas are more than this. So I have limited the json datas by following code (parsing by AsyncTask).</p>
  
  <pre><code>JSONArray data = json.getJSONArray("data"); 
   for (int i = 0; i &lt; 4; i++) {
    JSONObject object = data.getJSONObject(i);
    JSONObject product = object.getJSONObject("Products");
    Album item = new Album();
    item.setName(product.getString("pname"));
    item.setPrice(Double.valueOf(formatData.format(product.getDouble("pprice"))));
    display_deals_of_the_day.add(item);
  }
  </code></pre>
  
  <p>In recyclerview, column count is properly working. But row count is exceeding sometimes (not all the times). Can anyone help to solve this issue. My recyclerview code is mentioned below.</p>
  
  <pre><code>RecyclerView.LayoutManager mLayoutManager = new GridLayoutManager(getActivity(),2);
  recyclerView.setLayoutManager(mLayoutManager);
  recyclerView.addItemDecoration(new GridSpacingItemDecoration(2, dpToPx(1), true));
  recyclerView.setItemAnimator(new DefaultItemAnimator());
  </code></pre>