https://kotlinlang.org logo
#android
Title
# android
s

sourabhv

12/28/2017, 12:58 PM
@menegatti Unfortunately, no. @kingsley Then I get the error
Type mismatch. Required: VH? Found PaginatedRecyclerViewAdapter<VH, T>.BaseViewHolder?
k

kingsley

12/28/2017, 1:01 PM
Actually. The code looks delicate, in that you have a concrete class being passed as return type in that method, but the class expects a generic parameter anyway. A simple solution would be to get rid of VH entirely, so the class looks like this:
Copy code
class PaginatedRecyclerViewAdapter<PaginatedRecyclerViewAdapter.BaseViewHolder, T : Any>
s

sourabhv

12/28/2017, 1:06 PM
yep, that works, removed
VH
form the class entirely. 👍 Thanks!
👍 1