cymcsg / UltimateRecyclerView

A RecyclerView(advanced and flexible version of ListView in Android) with refreshing,loading more,animation and many other features.
Apache License 2.0
7.22k stars 1.43k forks source link

setCustomLoadMoreView #57

Closed linger1216 closed 9 years ago

linger1216 commented 9 years ago

setCustomLoadMoreView 接口为什么一定要在adapter设置, 这应该是RecyclerView职责啊, 而不该在adapter中.

linger1216 commented 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

cymcsg commented 9 years ago

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?