title: Data not displayed in list
body: <p>I am trying to set data into my <code>recyclerView</code> and I can't set the data into a list. When I debug, it's executing the statements and the values are found in logcat. But when I run, it is not found in the list. I have tried a lot. Can anyone please help. This is what I have done.</p>
  
  <p><strong>Adapter1</strong></p>
  
  <pre><code>SelectedAdditionalItemsAdapter adapter = new SelectedAdditionalItemsAdapter(activity, row.getAdditionalItems(), row);
                  recyclerView.setAdapter(adapter);
           adapter.setData(row.getAdditionalItems());
  </code></pre>
  
  <p><strong>SelectedAdditionalItemsAdapter</strong></p>
  
  <pre><code>public class SelectedAdditionalItemsAdapter extends RecyclerView.Adapter&lt;SelectedAdditionalItemsAdapter.ViewHolder&gt; {
  
  private List&lt;Product&gt; rows = new ArrayList&lt;&gt;();
  
          Context context;
  private OrderItem orderItem;
  
  
  private Activity activity;
  
  public OnOrderItemDeleteListner onOrderItemDeleteListner;
  
  
  
  public SelectedAdditionalItemsAdapter(Context context,List&lt;Product&gt; rows,OrderItem orderItem) {
          this.context = context;
          this.activity = (Activity) context;
          this.rows=rows;
          this.orderItem=orderItem;
          }
  
  public SelectedAdditionalItemsAdapter(){
  
          }
  
  public Product getItem(int position) {
          try {
          return rows.get(position);
          } catch (Exception e) {
          return null;
          }
          }
  
  public void setData(List&lt;Product&gt; rows) {
          this.rows = rows;
          notifyDataSetChanged();
  
          }
  
  @Override
  public long getItemId(int position) {
          return position;
          }
  
  
  @Override
  public SelectedAdditionalItemsAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int position) {
  
  
          return new SelectedAdditionalItemsAdapter.ViewHolder(LayoutInflater.from(parent.getContext())
          .inflate(R.layout.additional_item_cell, parent, false));
          }
  
  @Override
  public void onBindViewHolder(SelectedAdditionalItemsAdapter.ViewHolder holder, int position) {
  
          Product row = getItem(position);
  
          holder.bindVehicle(row, position);
  
          }
  
  @Override
  public int getItemCount() {
          try {
          return rows.size();
          } catch (NullPointerException e) {
          return 0;
          }
          }
  
  private void removeItem(int position) {
          try {
          this.rows.remove(position);
          }catch (Exception e) {
  
          }
          notifyDataSetChanged();
          }
  
  class ViewHolder extends RecyclerView.ViewHolder  {
  
      TextView title, remarkView, quantityView, priceView;
      ImageView deleteButton;
      CircularNetworkImageView imageView;
      private Product row;
  
      ViewHolder(View view) {
          super(view);
  
          title = (TextView) view.findViewById(R.id.title_view);
          remarkView = (TextView) view.findViewById(R.id.remark_view);
          imageView = (CircularNetworkImageView) view.findViewById(R.id.image_view);
          quantityView = (TextView) view.findViewById(R.id.quantity_view);
          priceView = (TextView) view.findViewById(R.id.price_view);
          deleteButton = (ImageView) view.findViewById(R.id.delete_button);
  
      }
          public void bindVehicle(final Product row, final int position) {
  
          deleteButton.setTag(position);///added
  
  
          this.row = row;
          deleteButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                           orderItem.removeProduct(row);
                      removeItem(position);
                      notifyDataSetChanged();
  
  
  
              }
  
          });
  
          try {
              this.title.setText(row.getName());
              if(row.getDescription() != null &amp;&amp; row.getDescription().length() &gt; 0) {
                  remarkView.setText(row.getDescription());
                  remarkView.setVisibility(View.VISIBLE);
              }else{
                  remarkView.setVisibility(View.GONE);
              }
              String title = row.getName();
              imageView.setImageUrl(null, RequestQueue.getImageLoader());
              ColorGenerator generator = ColorGenerator.MATERIAL;
              int color = generator.getColor(title);
  
              try {
                  if(title.length() &gt; 0) {
                      TextDrawable drawable2 = TextDrawable.builder()
                              .buildRound(title.substring(0, 1), color);
                      imageView.setImageDrawable(drawable2);
                  }
              }catch (NullPointerException e) {
            }
  quantityView.setText(Integer.toString((int)row.getQuantity()));
              priceView.setText(row.getPriceForUnitToDisplay());    
          } catch (NullPointerException e) {
              e.printStackTrace();
          }}}
  
  public interface OnOrderItemDeleteListner {
      void onDeleteItem();
  }}
  </code></pre>
  
  <p><code>This is my xml</code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:orientation="vertical" android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@drawable/layout_border"&gt;
  
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"
              android:padding="10dp"
              android:background="@color/white"&gt;
  
              &lt;driver.codepoints.com.driver.utils.CircularNetworkImageView
                  android:id="@+id/image_view"
                  android:layout_width="35dp"
                  android:layout_height="35dp"
                  android:scaleType="fitXY"
                  android:layout_marginRight="15dp"/&gt;
              &lt;com.devspark.robototextview.widget.RobotoTextView
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:id="@+id/title_view"
                  android:textSize="18sp"
                  android:textColor="@color/black" /&gt;
  
  
              &lt;ImageView
                  android:id="@+id/delete_button"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:tint="@color/android_red"
                  android:padding="8dp"
                  android:clickable="true"
                  android:layout_marginLeft="6dp"
                  android:layout_marginRight="6dp"
                  android:src="@drawable/ic_delete_black_24dp"/&gt;
  
  
          &lt;/LinearLayout&gt;
  
          &lt;com.devspark.robototextview.widget.RobotoTextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_margin="5dp"
              android:id="@+id/remark_view"
              android:textSize="14sp" /&gt;
          &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="10dp"
                  android:layout_marginLeft="50dp"
                  android:gravity="center_vertical"
                  android:orientation="horizontal"&gt;
                  &lt;com.devspark.robototextview.widget.RobotoTextView
                      android:id="@+id/quantity_view"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:background="@color/accent_color"
                      android:gravity="center"
                      android:paddingBottom="2dp"
                      android:paddingLeft="5dp"
                      android:paddingRight="5dp"
                      android:paddingTop="2dp"
                      android:textColor="@color/white"
                      android:textSize="16sp"
                       /&gt;
                  &lt;com.devspark.robototextview.widget.RobotoTextView
                      android:id="@+id/price_view"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:background="@color/login_text_hint_color"
                      android:gravity="center"
                      android:paddingBottom="2dp"
                      android:paddingLeft="5dp"
                      android:paddingRight="5dp"
                      android:paddingTop="2dp"
                      android:textColor="@color/black"
                      android:textSize="16sp"
                       /&gt;    
              &lt;/LinearLayout&gt;    
          &lt;/LinearLayout&gt;
  </code></pre>