Htoo Aung Kyaw
Aug 31, 2018 · 1 min read

Hi, Thanks for your sharing knowledge. I have implemented this kind of generic adapter before but it was not perfect like your adapter. I think Diffutils compute on the main thread and can have some problems. You should take a look at this. https://developer.android.com/reference/android/support/v7/recyclerview/extensions/AsyncListDiffer. And inflate() method in Adapter should always use false for attchToRoot parameter since we can’t attached list_item_layout to LayoutManager at the time of onCreateViewHolder().

    Htoo Aung Kyaw

    Written by