We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用BaseMultiItemQuickAdapter 时,自己继承的viewholder是内部类时会发生RecyclerViewholder反射造类失败,导致所有的convert方法不运行;
BaseMultiItemQuickAdapter
RecyclerViewholder
class ContentHolder extends RecyclerViewHolder<BaseQuickAdapter, BaseViewHolder, Object>
ps:使用静态内部类没毛病,反射那块有问题
Class<? extends RecyclerViewHolder> cls = holderClasses.get(viewType); Constructor c = cls.getDeclaredConstructors()[0]; // 第一个显式的构造函数 c.setAccessible(true); h = (RecyclerViewHolder) c.newInstance(new Object[]{this}); multiTypeViewHolders.get(viewType).put(key, h);
The text was updated successfully, but these errors were encountered:
收到
Sorry, something went wrong.
未复现该问题,若您仍遇到该问题,请按照 #2807 重新提交 Issue 。
No branches or pull requests
使用
BaseMultiItemQuickAdapter
时,自己继承的viewholder是内部类时会发生RecyclerViewholder
反射造类失败,导致所有的convert方法不运行;ps:使用静态内部类没毛病,反射那块有问题
The text was updated successfully, but these errors were encountered: