title: RecyclerView onCreateViewHolder method not calling
body: <p>Below are my <code>ShelflifeAdapter</code> and <code>HomeFragment</code> classes:-</p>
  <pre><code>public class HomeFragment extends Fragment {
  
  RecyclerView shelflifeRecyclerview;
  ShelflifeAdapter shelflifeAdapter;
  Product product;
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
  
  
  
      ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_home, container, false);
      shelflifeRecyclerview = rootView.findViewById(R.id.shelflifeRecyclerview);
  
      shelflifeAdapter = new ShelflifeAdapter(getContext());
  
      shelflifeRecyclerview.setAdapter(shelflifeAdapter);
      shelflifeRecyclerview.setLayoutManager(new LinearLayoutManager(getContext()));
      shelflifeRecyclerview.setHasFixedSize(true);
      //fragment-&gt;fragment 데이터받기
      Bundle bundle = getArguments(); //번들 받기
      if(bundle != null){
          product = new Product();
          product = (Product) bundle.getSerializable(&quot;bundle&quot;);
          shelflifeAdapter.addItem(product);
          Log.d(&quot;TAG&quot;, shelflifeAdapter.getItemCount() +&quot; 갯수&quot;);
      }
  
  
  
  
      return rootView;
  }
  </code></pre>
  <p>}</p>
  <hr />
  <pre><code>public class ShelflifeAdapter extends RecyclerView.Adapter&lt;ShelflifeAdapter.ViewHolder&gt;{
      ArrayList&lt;Product&gt; items = new ArrayList&lt;Product&gt;();
      Context mContext;
  
      ShelflifeAdapter(Context context){
          mContext = context;
      }
  
  
      @NonNull
      @Override
      public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
          Log.d(&quot;TAG&quot;,&quot;onCreateViewHolder 작동함&quot;);
          LayoutInflater inflater = LayoutInflater.from(parent.getContext());
          View itemView = inflater.inflate(R.layout.layout_shelflife,parent,false);
          return new ViewHolder(itemView);
      }
  
      @Override
      public void onBindViewHolder(@NonNull ViewHolder viewHolder, int position) {
          Log.d(&quot;TAG&quot;,&quot;onBindViewHolder 작동함&quot;);
          Product item = items.get(position);
          viewHolder.setItem(item,mContext);
  
      }
  
      @Override
      public int getItemCount() {
          return items.size();
      }
  
  
      public void addItem(Product item){
  
          if(item != null){
              Log.d(&quot;TAG&quot;,&quot;addItem 작동함(item 추가) : &quot; + item.toString());
              items.add(item);
              notifyDataSetChanged();
          }else{
              Log.d(&quot;TAG&quot;,&quot;addItem 작동함(item 못가져옴)&quot;);
          }
  
      }
  
      public void setItems(ArrayList&lt;Product&gt; items){
          this.items = items;
      }
  
      public Product getItem(int position){
          return items.get(position);
      }
  
  
      static class ViewHolder extends RecyclerView.ViewHolder {
          ImageView imageView;
          TextView tv_shelflife;
          LinearLayout itemContainer;
  
          public ViewHolder(@NonNull View itemView) {
              super(itemView);
  
              imageView = itemView.findViewById(R.id.imageView);
              tv_shelflife = itemView.findViewById(R.id.tv_shelflife);
              itemContainer = itemView.findViewById(R.id.itemContainer);
          }
  
          public void setItem(Product item, Context context){
              if(item != null){
  
                  Log.d(&quot;TAG&quot;,&quot;어댑터의 item : &quot;+ item.toString());
  
                  if(item.getImage()==null){
                      Glide.with(itemView).load(R.drawable.no_image).override(48,48).into(imageView);
                  }else{
                      Glide.with(itemView).load(item.image).override(48,48).into(imageView);
                  }
  
                  tv_shelflife.setText(item.shelflifeDate);
  
              }else{
                  Log.d(&quot;TAG&quot;,&quot;item이 null임&quot; );
              }
  
  
          }
      }
  }
  </code></pre>
  <hr />
  <p><code>addItem(Product item)</code> is working well
  But  <code>onCreateViewHolder</code> method is not working.
  Any help is appreciated !!!</p>