Annotations Recycler View ItemClick

I am trying to implement simple recycler view in my Activity based on the following tutorial from official AndroidAnnotations site: adapter link

However when I finish all the steps, and I try to implement @ItemClick method, it gives me the following error:

Error:(84, 36) error: incompatible types: RecyclerView cannot be converted to AdapterView

with the following code highlighted under my generated activity code:

...((AdapterView<?> ) this.miestnostiList).setOnItemClickListener(new OnItemClickListener() {...

As per guide, I have created the following base classes:

public abstract class RecyclerViewAdapterBase<T, V extends View> extends RecyclerView.Adapter<ViewWrapper<V>> {

    protected List<T> items = new ArrayList<T>();

    public int getItemCount() {
        return items.size();

    public final ViewWrapper<V> onCreateViewHolder(ViewGroup parent, int viewType) {
        return new ViewWrapper<V>(onCreateItemView(parent, viewType));

    protected abstract V onCreateItemView(ViewGroup parent, int viewType);

public class ViewWrapper<V extends View> extends RecyclerView.ViewHolder {

    private V view;

    public ViewWrapper(V itemView) {
        view = itemView;

    public V getView() {
        return view;

Then I created my row view item as following:

public class MiestnostItemView extends LinearLayout{
    TextView nazov;

    public MiestnostItemView(Context context) {

    public void bind(Miestnost miestnost){

and finally my adapter class:

public class ListMiestnostiAdapter extends RecyclerViewAdapterBase<Miestnost, MiestnostItemView> {
    Context context;

    protected MiestnostItemView onCreateItemView(ViewGroup parent, int viewType) {

    public void onBindViewHolder(ViewWrapper<MiestnostItemView> holder, int position) {
        MiestnostItemView view = holder.getView();
        Miestnost miestnost = items.get(position);


Under my Activity I initialize my adapter in @AfterViews section:

    RecyclerView miestnostiList;

    ListMiestnostiAdapter adapter;

    void bindAdapter() {
        GetData();//fetch data

        adapter = new ListMiestnostiAdapter();
        RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getApplicationContext());
        miestnostiList.setItemAnimator(new DefaultItemAnimator());
        miestnostiList.addItemDecoration(new DividerItemDecoration(this, LinearLayoutManager.VERTICAL));


Here is my @ItemClick method:

void miestnostiListItemClicked(Miestnost miestnost){
    Log.i("", "iteClicked: ");

What am I missing here?