title: RecyclerView showing only first two items
body: <p>I am trying to parse a remote JSON file, everything works fine but it only shows first two items and nothing else.</p>
  
  <p>I checked XML file and height of the layout is <code>wrap_content</code>.</p>
  
  <p>Here is my code in fragment where I am trying to use <code>RecyclerView</code>.</p>
  
  <pre><code>        channel_list = view.findViewById(R.id.channel_list);
      channel_list.setHasFixedSize(true);
      channel_list.setLayoutManager(new LinearLayoutManager(getActivity()));
      channel_list.setNestedScrollingEnabled(false);
  
      listItems = new ArrayList&lt;&gt;();
  
      channel_adapter = new Channel_Adapter(listItems,getActivity());
      channel_list.setAdapter(channel_adapter);
  
      channel_progress = view.findViewById(R.id.channel_progress);
  
      StringRequest stringRequest = new StringRequest(Request.Method.GET,
              channel_data,
              new Response.Listener&lt;String&gt;() {
                  @Override
                  public void onResponse(String response) {
                      channel_progress.setVisibility(View.GONE);
                      try {
                          JSONObject json = new JSONObject(response);
                          JSONArray array = json.getJSONArray("channels");
  
                          for(int i = 0; i &lt; array.length(); i++){
                              JSONObject o = array.getJSONObject(i);
                              Channel_Item item = new Channel_Item(
                                      o.optString("name"),
                                      o.optString("network"),
                                      o.optString("description"),
                                      o.optString("programs"),
                                      o.optString("logo")
                              );
  
                              listItems.add(item);
                          }
  
                          Toast.makeText(getActivity(), "Size" + listItems.size(), Toast.LENGTH_SHORT).show();
  
                          channel_adapter.notifyDataSetChanged();
  
                      } catch (JSONException e) {
                          e.printStackTrace();
                      }
                  }
              }, new Response.ErrorListener() {
          @Override
          public void onErrorResponse(VolleyError error) {
              channel_progress.setVisibility(View.GONE);
              Toast.makeText(getActivity(), error.getMessage(), Toast.LENGTH_SHORT).show();
          }
      });
  
      RequestQueue requestQueue = Volley.newRequestQueue(getActivity());
      requestQueue.add(stringRequest);
  </code></pre>
  
  <p>Here is the XML file for the same.</p>
  
  <pre><code>&lt;ScrollView
  android:layout_height="wrap_content"
  android:layout_width="match_parent"
  xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
  &lt;FrameLayout android:layout_height="wrap_content"
      android:layout_width="match_parent"
      android:orientation="vertical"
      &gt;
  
      &lt;ProgressBar
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:id="@+id/channel_progress"/&gt;
  
      &lt;android.support.v7.widget.RecyclerView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/channel_list"&gt;
  
      &lt;/android.support.v7.widget.RecyclerView&gt;
  
  &lt;/FrameLayout&gt;
  
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>here is my whole logcat</p>
  
  <pre><code>03-24 18:09:14.247 4845-4845/a.tvreminder I/InstantRun: starting instant run server: is main process
  03-24 18:09:14.355 4845-4845/a.tvreminder W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
  03-24 18:09:14.791 4845-4871/a.tvreminder D/NetworkSecurityConfig: No Network Security Config specified, using platform default
  
                                                                 [ 03-24 18:09:14.942  4845: 4869 D/         ]
                                                                 HostConnection::get() New Host Connection established 0xa94665c0, tid 4869
  03-24 18:09:14.944 4845-4869/a.tvreminder I/OpenGLRenderer: Initialized EGL, version 1.4
  03-24 18:09:14.944 4845-4869/a.tvreminder D/OpenGLRenderer: Swap behavior 1
  03-24 18:09:14.944 4845-4869/a.tvreminder W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
  03-24 18:09:14.945 4845-4869/a.tvreminder D/OpenGLRenderer: Swap behavior 0
  03-24 18:09:15.037 4845-4845/a.tvreminder W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
  </code></pre>
  
  <p>here is my adapter.</p>
  
  <pre><code>public class Channel_Adapter extends 
  RecyclerView.Adapter&lt;Channel_Adapter.ViewHolder&gt; {
  
  View v;
  
  private List&lt;Channel_Item&gt; listItems;
  private Context context;
  
  public Channel_Adapter(List&lt;Channel_Item&gt; listItems, Context context) {
      this.listItems = listItems;
      this.context = context;
  }
  
  @Override
  public Channel_Adapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
  
      v = LayoutInflater.from(parent.getContext())
              .inflate(R.layout.channel_card, parent, false);
      return new ViewHolder(v);
  
  }
  
  @Override
  public void onBindViewHolder(Channel_Adapter.ViewHolder holder, int position) {
      final Channel_Item item = listItems.get(position);
  
      holder.channel_name.setText(item.getName());
      holder.channel_network.setText(item.getNetwork());
      holder.channel_description.setText(item.getDescription());
  
      Glide.with(context)
              .load(item.getLogo())
              //.thumbnail(0.9f)
              //.placeholder(R.drawable.ic_image)
              .into(holder.channel_logo);
  
  
      holder.card_body.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              item.getPrograms();
  
          }
      });
  
  }
  
  @Override
  public int getItemCount() {
      return listItems.size();
  }
  
  public class ViewHolder extends RecyclerView.ViewHolder{
  
      public TextView channel_name,channel_network,channel_description;
      public ImageView channel_logo;
      public LinearLayout card_body;
  
      public ViewHolder(View itemView) {
          super(itemView);
  
          channel_network = (TextView) itemView.findViewById(R.id.channel_network);
          channel_description = (TextView) itemView.findViewById(R.id.channel_description);
          channel_name = (TextView) itemView.findViewById(R.id.channel_name);
          channel_logo = (ImageView) itemView.findViewById(R.id.channel_logo);
          card_body = (LinearLayout) itemView.findViewById(R.id.channel_card_body);
  
      }
  }
  
  public void updateChannelList(List&lt;Channel_Item&gt; channelList){
      this.listItems.addAll(channelList);
      notifyDataSetChanged();
  }
  
  }
  </code></pre>