Closed ldt116 closed 7 years ago
We have 2 contructors as below
public EndlessRecyclerViewAdapter(Context context, Adapter wrapped, RequestToLoadMoreListener requestToLoadMoreListener, @LayoutRes int pendingViewResId, boolean keepOnAppending) { ... public EndlessRecyclerViewAdapter(Context context, Adapter wrapped, RequestToLoadMoreListener requestToLoadMoreListener) {
Actually, the context is used for getting layout inflater service
private View getPendingView(ViewGroup viewGroup) { return LayoutInflater.from(context).inflate(pendingViewResId, viewGroup, false); }
We can reduce this by getting the context from the viewGroup in getPendingView.
viewGroup
getPendingView
We have 2 contructors as below
Actually, the context is used for getting layout inflater service
We can reduce this by getting the context from the
viewGroup
ingetPendingView
.