title: ViewHolder with a constructor which takes a view recycler view
body: <p>Hi Friends i had struck in this problem from 2 days i dont know whats the problem here i am using the Fast <code>Adapter</code> by mikepenz where i have two recycler view in this.Here i am getting this error </p>
  
  <pre><code>java.lang.RuntimeException: You have to provide a ViewHolder with a constructor which takes a view!
  at com.mikepenz.fastadapter.items.AbstractItem$ReflectionBasedViewHolderFactory.create(AbstractItem.java:349)
  </code></pre>
  
  <p>I think i had set the everything correct as i am using same format in other class as well but i am only facing this issue class only and i dont have activated the progurard please find the below code</p>
  
  <p>Main Class:</p>
  
  <pre><code>public class Incoming_request extends Fragment {
  @BindView(R.id.incoming_req_recycler_view)
  RecyclerView incoming_req_recycler_view;
  @BindView(R.id.people_recycler_view)
  RecyclerView people_recycler_view;
  FastItemAdapter&lt;Incoming_Request_adapter&gt; incoming_req_adapter = new FastItemAdapter&lt;&gt;();
  FastItemAdapter&lt;People_Request_adapter&gt; people_req_adapter = new FastItemAdapter&lt;&gt;();
  @BindView(R.id.frd_req_no)
  AppCompatTextView frd_req_no;
    @BindView(R.id.namesearch)
  AutoCompleteTextView namesearch;
  ArrayList&lt;Search_Pojo&gt; searchlist = new ArrayList&lt;&gt;();
  Search_Adapter search_adapter;
  
  @Nullable
  @Override
  public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
      return inflater.inflate(R.layout.incoming_req, container, false);
  }
  
  @Override
  public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
      super.onViewCreated(view, savedInstanceState);
      ButterKnife.bind(this, view);
      incoming_req_recycler_view.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
      people_recycler_view.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
      incoming_requests("");
      incoming_req_recycler_view.setAdapter(incoming_req_adapter);
      people_recycler_view.setAdapter(people_req_adapter);
      search_adapter=new Search_Adapter(getActivity(),R.layout.search_adapter_item,searchlist);
      namesearch.setThreshold(1);
      namesearch.setAdapter(search_adapter);
      search_adapter.notifyDataSetChanged();
      namesearch.setOnItemClickListener(new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
              Search_Pojo search = (Search_Pojo) parent.getItemAtPosition(position);
              namesearch.setText(search.getUsername());
              Intent otherprofileintent = new Intent(getActivity(), Other_Profile.class);
              otherprofileintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
              otherprofileintent.putExtra("frd_status", search.getFriend_status());
              otherprofileintent.putExtra("frd_id", search.getUserid());
              startActivity(otherprofileintent);
          }
      });
      people_req_adapter.withOnClickListener(new FastAdapter.OnClickListener&lt;People_Request_adapter&gt;() {
          @Override
          public boolean onClick(View v, IAdapter&lt;People_Request_adapter&gt; adapter, People_Request_adapter item, int position) {
              Intent otherprofileintent = new Intent(getActivity(), Other_Profile.class);
              otherprofileintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
              otherprofileintent.putExtra("frd_status", item.getFriend_status());
              otherprofileintent.putExtra("frd_id", item.getTo_user_id());
              startActivity(otherprofileintent);
              return true;
          }
      });
      people_req_adapter.withItemEvent(new ClickEventHook&lt;People_Request_adapter&gt;() {
          @Override
          public void onClick(View v, int position, FastAdapter&lt;People_Request_adapter&gt; fastAdapter, People_Request_adapter item) {
              acceptrequest(item.getTo_user_id(), position);
          }
  
          @Nullable
          @Override
          public View onBind(@NonNull RecyclerView.ViewHolder viewHolder) {
              if (viewHolder instanceof Incoming_Request_adapter.FriendRequest_ViewHolder) {
                  return viewHolder.itemView.findViewById(R.id.accept);
              }
              return null;
          }
      });
      people_req_adapter.withItemEvent(new ClickEventHook&lt;People_Request_adapter&gt;() {
          @Override
          public void onClick(View v, int position, FastAdapter&lt;People_Request_adapter&gt; fastAdapter, People_Request_adapter item) {
              deleterequest(item.getTo_user_id(), position);
          }
  
          @Nullable
          @Override
          public View onBind(@NonNull RecyclerView.ViewHolder viewHolder) {
              if (viewHolder instanceof Incoming_Request_adapter.FriendRequest_ViewHolder) {
                  return viewHolder.itemView.findViewById(R.id.cancel);
              }
              return null;
          }
      });
      people_req_adapter.withItemEvent(new ClickEventHook&lt;People_Request_adapter&gt;() {
          @Override
          public void onClick(View v, int position, FastAdapter&lt;People_Request_adapter&gt; fastAdapter, People_Request_adapter item) {
              sendrequest(item.getTo_user_id(), position);
          }
  
          @Nullable
          @Override
          public View onBind(@NonNull RecyclerView.ViewHolder viewHolder) {
              if (viewHolder instanceof Incoming_Request_adapter.FriendRequest_ViewHolder) {
                  return viewHolder.itemView.findViewById(R.id.sendrequest);
              }
              return null;
          }
      });
  
      incoming_req_adapter.withOnClickListener(new FastAdapter.OnClickListener&lt;Incoming_Request_adapter&gt;() {
          @Override
          public boolean onClick(View v, IAdapter&lt;Incoming_Request_adapter&gt; adapter, Incoming_Request_adapter item, int position) {
              Intent otherprofileintent = new Intent(getActivity(), Other_Profile.class);
              otherprofileintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
              otherprofileintent.putExtra("frd_status", item.getFriend_status());
              otherprofileintent.putExtra("frd_id", item.getTo_user_id());
              startActivity(otherprofileintent);
              return true;
          }
      });
      incoming_req_adapter.withItemEvent(new ClickEventHook&lt;Incoming_Request_adapter&gt;() {
          @Override
          public void onClick(View v, int position, FastAdapter&lt;Incoming_Request_adapter&gt; fastAdapter, Incoming_Request_adapter item) {
              acceptrequest(item.getTo_user_id(), position);
          }
  
          @Nullable
          @Override
          public View onBind(@NonNull RecyclerView.ViewHolder viewHolder) {
              if (viewHolder instanceof Incoming_Request_adapter.FriendRequest_ViewHolder) {
                  return viewHolder.itemView.findViewById(R.id.accept);
              }
              return null;
          }
      });
      incoming_req_adapter.withItemEvent(new ClickEventHook&lt;Incoming_Request_adapter&gt;() {
          @Override
          public void onClick(View v, int position, FastAdapter&lt;Incoming_Request_adapter&gt; fastAdapter, Incoming_Request_adapter item) {
              deleterequest(item.getTo_user_id(), position);
          }
  
          @Nullable
          @Override
          public View onBind(@NonNull RecyclerView.ViewHolder viewHolder) {
              if (viewHolder instanceof Incoming_Request_adapter.FriendRequest_ViewHolder) {
                  return viewHolder.itemView.findViewById(R.id.cancel);
              }
              return null;
          }
      });
      incoming_req_adapter.withItemEvent(new ClickEventHook&lt;Incoming_Request_adapter&gt;() {
          @Override
          public void onClick(View v, int position, FastAdapter&lt;Incoming_Request_adapter&gt; fastAdapter, Incoming_Request_adapter item) {
              sendrequest(item.getTo_user_id(), position);
          }
  
          @Nullable
          @Override
          public View onBind(@NonNull RecyclerView.ViewHolder viewHolder) {
              if (viewHolder instanceof Incoming_Request_adapter.FriendRequest_ViewHolder) {
                  return viewHolder.itemView.findViewById(R.id.sendrequest);
              }
              return null;
          }
      });
      /*incoming_refresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
          @Override
          public void onRefresh() {
              loadrefreshcomplete = 1;
              incoming_req_adapter.clear();
              incoming_requests("");
          }
      });*/
  
  
  }
  
  private void incoming_requests(String value) {
      if (value.isEmpty()) {
          Constant.showloader(getActivity());
      }
      String outgoing_requesturl = Constant.psurl + "myrequests&amp;userid=" + Session.getUserID(getActivity());
      Constant.l(outgoing_requesturl);
      AndroidNetworking.get(outgoing_requesturl).setOkHttpClient(Constant.okClient()).build().getAsJSONObject(new JSONObjectRequestListener() {
          @Override
          public void onResponse(JSONObject response) {
              try {
                  if (response.has("friendrequests")) {
                      JSONArray userlistarray = response.getJSONArray("friendrequests");
                      for (int i = 0; i &lt; userlistarray.length(); i++) {
                          JSONObject frdsarrayobj = userlistarray.getJSONObject(i);
                          Incoming_Request_adapter incomingadapter = new Incoming_Request_adapter();
                          Search_Pojo search_pojo = new Search_Pojo();
                          search_pojo.setUserid(frdsarrayobj.getString("userid"));
                          search_pojo.setUsername(frdsarrayobj.getString("username"));
                          search_pojo.setEmail(frdsarrayobj.getString("email"));
                          search_pojo.setPhone(frdsarrayobj.getString("phone"));
                          search_pojo.setCity(frdsarrayobj.getString("city"));
                          search_pojo.setUserstatus(frdsarrayobj.getString("user_status"));
                          search_pojo.setUser_profile_pic(frdsarrayobj.getString("userprofile"));
                          search_pojo.setFriend_status(frdsarrayobj.getString("friend_status"));
                          incomingadapter.setTo_user_id(frdsarrayobj.getString("userid"));
                          incomingadapter.setUsername(frdsarrayobj.getString("username"));
                          incomingadapter.setEmail(frdsarrayobj.getString("email"));
                          incomingadapter.setPhone(frdsarrayobj.getString("phone"));
                          incomingadapter.setCity(frdsarrayobj.getString("city"));
                          incomingadapter.setUserstatus(frdsarrayobj.getString("user_status"));
                          incomingadapter.setUser_profile_pic(frdsarrayobj.getString("userprofile"));
                          incomingadapter.setFriend_status(frdsarrayobj.getString("friend_status"));
                          incoming_req_adapter.add(incomingadapter);
                          searchlist.add(search_pojo);
                      }
                  } else {
                      frd_req_no.setVisibility(View.VISIBLE);
                      incoming_req_recycler_view.setVisibility(View.GONE);
                  }
                  if (response.has("userslist")) {
                      JSONArray frdlistarray = response.getJSONArray("userslist");
                      for (int j = 0; j &lt; frdlistarray.length(); j++) {
                          JSONObject userarrayobj = frdlistarray.getJSONObject(j);
                          Search_Pojo search_pojo = new Search_Pojo();
                          search_pojo.setUserid(userarrayobj.getString("userid"));
                          search_pojo.setUsername(userarrayobj.getString("username"));
                          search_pojo.setEmail(userarrayobj.getString("email"));
                          search_pojo.setPhone(userarrayobj.getString("phone"));
                          search_pojo.setCity(userarrayobj.getString("city"));
                          search_pojo.setUserstatus(userarrayobj.getString("user_status"));
                          search_pojo.setUser_profile_pic(userarrayobj.getString("userprofile"));
                          search_pojo.setFriend_status(userarrayobj.getString("friend_status"));
                          People_Request_adapter peoplgreqadapter = new People_Request_adapter();
                          peoplgreqadapter.setTo_user_id(userarrayobj.getString("userid"));
                          peoplgreqadapter.setUsername(userarrayobj.getString("username"));
                          peoplgreqadapter.setEmail(userarrayobj.getString("email"));
                          peoplgreqadapter.setPhone(userarrayobj.getString("phone"));
                          peoplgreqadapter.setCity(userarrayobj.getString("city"));
                          peoplgreqadapter.setUserstatus(userarrayobj.getString("user_status"));
                          peoplgreqadapter.setUser_profile_pic(userarrayobj.getString("userprofile"));
                          peoplgreqadapter.setFriend_status(userarrayobj.getString("friend_status"));
                          people_req_adapter.add(peoplgreqadapter);
                          searchlist.add(search_pojo);
                      }
                  }
  
              } catch (JSONException e) {
                  Constant.l(e.toString());
                  Constant.dismissloader();
              }
              if (!value.isEmpty()) {
                  Constant.dismissloader();
              }
              /*if (loadrefreshcomplete == 1) {
                  loadrefreshcomplete = 0;
                  incoming_refresh.setRefreshing(false);
                  Constant.dismissloader();
              }*/
          }
  
          @Override
          public void onError(ANError anError) {
              Constant.l(anError.toString());
              Constant.dismissloader();
          }
      });
  }
  
  
  public void acceptrequest(String fid, final int position) {
      Constant.showloader(getActivity());
      String sendurl = Constant.psurl + "sendrequest&amp;from_id=" + fid + "&amp;to_id=" + Session.getUserID(getActivity());
      Constant.l(sendurl);
      AndroidNetworking.get(sendurl).build().getAsJSONObject(new JSONObjectRequestListener() {
          @Override
          public void onResponse(JSONObject response) {
              try {
                  if (response.getString("status").equals("Success")) {
                      incoming_req_adapter.remove(position);
                  }
              } catch (JSONException e) {
                  Constant.l(e.toString());
                  Constant.dismissloader();
              }
              Constant.dismissloader();
          }
  
          @Override
          public void onError(ANError anError) {
              Constant.l(anError.toString());
              Constant.dismissloader();
          }
      });
  }
  
  public void deleterequest(String fid, final int position) {
      Constant.showloader(getActivity());
      String sendurl = Constant.psurl + "deleterequest&amp;from_id=" + Session.getUserID(getActivity()) + "&amp;to_id=" + fid;
      Constant.l(sendurl);
      AndroidNetworking.get(sendurl).build().getAsJSONObject(new JSONObjectRequestListener() {
          @Override
          public void onResponse(JSONObject response) {
              try {
                  if (response.getString("status").equals("Success")) {
                      incoming_req_adapter.remove(position);
                  }
              } catch (JSONException e) {
                  Constant.l(e.toString());
                  Constant.dismissloader();
              }
              Constant.dismissloader();
          }
  
          @Override
          public void onError(ANError anError) {
              Constant.l(anError.toString());
              Constant.dismissloader();
          }
      });
  }
  
  public void sendrequest(String fid, final int position) {
      Constant.showloader(getActivity());
      String sendurl = Constant.psurl + "sendrequest&amp;from_id=" + Session.getUserID(getActivity()) + "&amp;to_id=" + fid;
      Constant.l(sendurl);
      AndroidNetworking.get(sendurl).build().getAsJSONObject(new JSONObjectRequestListener() {
          @Override
          public void onResponse(JSONObject response) {
              try {
                  if (response.getString("status").equals("Success")) {
                      incoming_req_adapter.remove(position);
                      EventBus.getDefault().post(new Event_Bus("outgoing"));
                  }
              } catch (JSONException e) {
                  Constant.l(e.toString());
                  Constant.dismissloader();
              }
              Constant.dismissloader();
          }
  
          @Override
          public void onError(ANError anError) {
              Constant.l(anError.toString());
              Constant.dismissloader();
          }
      });
  }
  
  @Subscribe(threadMode = ThreadMode.MAIN)
  public void groupcreated(Event_Bus eventBus) {
      if (eventBus.getEventname().equals("incoming")) {
          incoming_req_adapter.clear();
          incoming_requests("incoming");
          Constant.dismissloader();
      }
  }
  
  @Override
  public void onStart() {
      super.onStart();
      EventBus.getDefault().register(this);
  }
  
  @Override
  public void onStop() {
      EventBus.getDefault().unregister(this);
      super.onStop();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Adapter.class</p>
  
  <pre><code>public class Incoming_Request_adapter extends AbstractItem&lt;Incoming_Request_adapter, Incoming_Request_adapter.FriendRequest_ViewHolder&gt; {
      @SerializedName("userid")
      private String to_user_id;
      @SerializedName("userprofile")
      private String user_profile_pic;
      @SerializedName("username")
      private String username;
      @SerializedName("email")
      private String email;
      @SerializedName("phone")
      private String phone;
      @SerializedName("city")
      private String city;
      @SerializedName("user_status")
      private String userstatus;
      @SerializedName("friend_status")
      private String friend_status;
  
  
      public String getFriend_status() {
          return friend_status;
      }
  
      public void setFriend_status(String friend_status) {
          this.friend_status = friend_status;
      }
  
      public String getTo_user_id() {
          return to_user_id;
      }
  
      public void setTo_user_id(String to_user_id) {
          this.to_user_id = to_user_id;
      }
  
      public String getUser_profile_pic() {
          return user_profile_pic;
      }
  
      public void setUser_profile_pic(String user_profile_pic) {
          this.user_profile_pic = user_profile_pic;
      }
  
      public String getUsername() {
          return username;
      }
  
      public void setUsername(String username) {
          this.username = username;
      }
  
      public String getEmail() {
          return email;
      }
  
      public void setEmail(String email) {
          this.email = email;
      }
  
      public String getPhone() {
          return phone;
      }
  
      public void setPhone(String phone) {
          this.phone = phone;
      }
  
      public String getCity() {
          return city;
      }
  
      public void setCity(String city) {
          this.city = city;
      }
  
      public String getUserstatus() {
          return userstatus;
      }
  
      public void setUserstatus(String userstatus) {
          this.userstatus = userstatus;
      }
  
      @Override
      public int getType() {
          return R.id.incoming_req_recycler_view;
      }
  
  
      @Override
      public int getLayoutRes() {
          return R.layout.incoming_request_item;
      }
  
      @Override
      public void bindView(FriendRequest_ViewHolder holder, List&lt;Object&gt; payloads) {
          super.bindView(holder, payloads);
          holder.frd_req_item_name.setText(username.replace("$", " "));
          holder.frd_req_msg.setText(userstatus.replace("$", " "));
          Picasso.with(holder.itemView.getContext()).load(user_profile_pic).into(holder.frd_req_img);
          if (friend_status.equals("1")) {
              holder.linearLayout.setVisibility(View.VISIBLE);
              holder.sendrequest.setVisibility(View.GONE);
          } else if (friend_status.equals("0")) {
              holder.linearLayout.setVisibility(View.GONE);
              holder.sendrequest.setVisibility(View.VISIBLE);
          }
  
  
      }
  
  
      public static class FriendRequest_ViewHolder extends RecyclerView.ViewHolder {
          @BindView(R.id.frd_req_img)
          CircleImageView frd_req_img;
          @BindView(R.id.frd_req_item_name)
          TextView frd_req_item_name;
          @BindView(R.id.frd_req_msg)
          TextView frd_req_msg;
          @BindView(R.id.accept)
          FancyButton accept;
          @BindView(R.id.cancel)
          FancyButton cancel;
          @BindView(R.id.linearLayout)
          LinearLayout linearLayout;
          @BindView(R.id.sendrequest)
          FancyButton sendrequest;
          @BindView(R.id.incoming_text)
          AppCompatTextView incoming_text;
  
  
          public FriendRequest_ViewHolder(View itemView) {
              super(itemView);
              ButterKnife.bind(this, itemView);
          }
      }
  }
  </code></pre>