cymcsg / cymcsg/UltimateRecyclerView

swapAdapter issue

Open
#175 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

I have two adapters with different ViewHolder.

```
switch(currentLayout){
case TYPE_LIST:{
imgSwitch.setImageResource(R.drawable.btn_search_switch_image);
rycView.swapAdapter(listAdapter, true);
break;
}
case TYPE_GRID:{
imgSwitch.setImageResource(R.drawable.btn_search_switch_list);
rycView.swapAdapter(gridQuestionsAdapter, true);
break;
}
}
```

i get errors.
java.lang.ClassCastException: com.votee.ui.main.explore.search.adapter.SearchResultWithListAdapter$ViewHolder cannot be cast to com.votee.ui.main.profile.adapter.GridQuestionsAdapter$ViewHolder

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.