Closed linger1216 closed 9 years ago
if use
View loadmoreView = getActivity().getLayoutInflater()
.inflate(R.layout.custom_bottom_progressbar, null);
mAdapter.setCustomLoadMoreView(loadmoreView);
then crash in onBindViewHolder functions
happened "RecyclerView.ViewHolder cast to UltimateRecyclerviewViewHolder"
java.lang.ClassCastException: com.marshalchen.ultimaterecyclerview.UltimateViewAdapter$UltimateRecyclerviewViewHolder cannot be cast to com.lid.joycomic.adapter.ComicListViewAdapter$MyViewHolder
In the demo there is simpleRecyclerViewAdapter.setCustomLoadMoreView(LayoutInflater.from(this) .inflate(R.layout.custom_bottom_progressbar, null));
.Do you think you have some other bugs in you app?
setCustomLoadMoreView 接口为什么一定要在adapter设置, 这应该是RecyclerView职责啊, 而不该在adapter中.