title: How to pass a local drawable image to model class?
body: <p>When I create the object of my model class. I got this error. I don't know how to pass my local image from drawable to my model class.</p>
  
  <p>This is my model class.</p>
  
  <pre><code>public class Drawer {
  
  private String image;
  private String title;
  
  public Drawer(String image, String title) {
      this.image = image;
      this.title = title;
  }
  
  public String getImage() {
      return image;
  }
  
  public void setImage(String image) {
      this.image = image;
  }
  
  public String getTitle() {
      return title;
  }
  
  public void setTitle(String title) {
      this.title = title;
  }
  }
  </code></pre>
  
  <p>This is my Adapter class code. I am passing the model class to the Adapter.</p>
  
  <pre><code>public class DrawerAdapter extends RecyclerView.Adapter&lt;DrawerAdapter.ViewHolder&gt; {
  
  private List&lt;Drawer&gt; drawerList;
  ItemNavigationDrawerBinding binding;
  
  public DrawerAdapter(List&lt;Drawer&gt; drawerList) {
      this.drawerList = drawerList;
  }
  
  @NonNull
  @Override
  public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
      binding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.item_navigation_drawer, parent, false);
      return new ViewHolder(binding);
  }
  
  @Override
  public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
  
      Glide.with(holder.itemView.getContext()).load(drawerList.get(position).getImage()).into(holder.binding.imgMain);
      holder.binding.tvMain.setText(drawerList.get(position).getTitle());
  
  }
  
  @Override
  public int getItemCount() {
      return drawerList.size();
  }
  
  public class ViewHolder extends RecyclerView.ViewHolder {
  
      ItemNavigationDrawerBinding binding;
  
      private ViewHolder(@NonNull ItemNavigationDrawerBinding binding) {
          super(binding.getRoot());
          this.binding = binding;
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>This is how I am creating a model class object.</p>
  
  <pre><code>ArrayList&lt;Drawer&gt; drawerList = new ArrayList&lt;&gt;();
  drawerList.add(new Drawer(, "My Mall"));
  </code></pre>