My RecyclerView
does not call onCreateViewHolder
, onBindViewHolder
even MenuViewHolder
constructor, therefore nothing app
Make sure your XML
and Koltin/Java
code match. In my case, I had a problem with the ViewHolder
since I had written:
var txt: AppCompatTextView = itemView.findViewById(R.id.txt)
But since my XML code is:
I had to change the privious row into:
var txt: TextView = itemView.findViewById(R.id.txt)
In addition, I also had to remove:
recyclerView.setHasFixedSize(true);
I hope this can help you :)