@Test public void onCreateViewHolder_Should_InflateLayoutFromBinder_ReturnEmptyViewHolder() { RecyclerView.ViewHolder vh = adapter.onCreateViewHolder(parent, 0); verify(inflater).inflate(eq(itemBinder.getLayoutId()), same(parent), eq(false)); assertEquals(EmptyViewHolder.class, vh.getClass()); assertSame(itemView, vh.itemView); }
@Override @NonNull public EmptyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) { LayoutInflater inflater = (LayoutInflater) viewGroup.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); return new EmptyViewHolder(inflater.inflate(viewType, viewGroup, false)); }
WitchRecyclerViewAdapter extends RecyclerView.Adapter<EmptyViewHolder> { @Override @NonNull public EmptyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) { LayoutInflater inflater = (LayoutInflater) viewGroup.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); return new EmptyViewHolder(inflater.inflate(viewType, viewGroup, false)); } }
WitchRecyclerViewAdapter extends RecyclerView.Adapter<EmptyViewHolder> { @Override @NonNull public EmptyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) { LayoutInflater inflater = (LayoutInflater) viewGroup.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); return new EmptyViewHolder(inflater.inflate(viewType, viewGroup, false)); } WitchRecyclerViewAdapter(List<Item> items, List<Binder<? extends Item>> binders);  WitchRecyclerViewAdapter(List<Binder<? extends Item>> binders); }
WitchRecyclerViewAdapter extends RecyclerView.Adapter<EmptyViewHolder> { @Override @NonNull public EmptyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) { LayoutInflater inflater = (LayoutInflater) viewGroup.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); return new EmptyViewHolder(inflater.inflate(viewType, viewGroup, false)); } WitchRecyclerViewAdapter(List<Item> items, List<Binder<? extends Item>> binders);  WitchRecyclerViewAdapter(List<Binder<? extends Item>> binders); @Override int getItemViewType(int position); @Override @NonNull EmptyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType); @Override void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position); @Override int getItemCount(); List<Item> getItems(); void setItems(List<Item> items); }
WitchRecyclerViewAdapter extends RecyclerView.Adapter<EmptyViewHolder> { @Override @NonNull public EmptyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) { LayoutInflater inflater = (LayoutInflater) viewGroup.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); return new EmptyViewHolder(inflater.inflate(viewType, viewGroup, false)); } WitchRecyclerViewAdapter(List<Item> items, List<Binder<? extends Item>> binders);  WitchRecyclerViewAdapter(List<Binder<? extends Item>> binders); @Override int getItemViewType(int position); @Override @NonNull EmptyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType); @Override void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position); @Override int getItemCount(); List<Item> getItems(); void setItems(List<Item> items);  }