Why when I tried to add additional view to recyclerView after recyclerView.setAdapter()
return this error
Attempt to invoke virtual meth
I think, the problem is:
You have set the adapter of recyclerview to the adapter that you have made with the class
Adapters: An Adapter object acts as a bridge between an AdapterView and the underlying data for that view. The Adapter provides access to the data items. The Adapter is also responsible for making a View for each item in the data set.
So your adapter view has already provided the view to your recyclerView items.
Now when you are trying to insert an item that is out of context of the view that adapter has provided, it shows an error that your view might not have the same context as adapter's.
So it is not accepting textView in your recyclerView as it should be in the form of cardview that your adapter class is providing.