Coder Social home page Coder Social logo

jrecycleview's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jrecycleview's Issues

使用全局下拉加载遇到的问题

作者你好:
我在项目中使用到你的框架遇到了个问题:
在全局设置 下拉样式:如下
JRecycleViewManager.getInstance().setLoadMoreView(new MyLoadMoreView(getBaseContext()));
因为 在项目中有不止一处地方用的了 上拉加载更多。。所以设置了统一样式。。以此为背景。
遇到这个异常:ViewHolder views must not be attached when created. Ensure that you are not passing 'true' to the attachToRoot parameter of LayoutInflater.inflate(..., boolean attachToRoot)
看源码发现: if (holder.itemView.getParent() != null) {
throw new IllegalStateException("ViewHolder views must not be attached when"
+ " created. Ensure that you are not passing 'true' to the attachToRoot"
+ " parameter of LayoutInflater.inflate(..., boolean attachToRoot)");
}

如果设置了全局MyLoadMoreView 作为ViewHoder 复用的时候会出现 第一次 不会有问题。。但是如果项目中 有二个地方已经以上用到的话: holder.itemView(MyLoadMoreView ).getParent 是值 是第一次 JRrecycleView 就这在里报出了异常。 我现在的做法是 在每个用到 jRecycleView 的时候。都

MyLoadMoreView myLoadMoreView = new MyLoadMoreView(context);
jRefreshAndLoadMoreAdapter.setLoadMoreView(myLoadMoreView);
都设置了这个新的 MyLoadMoewView 这样 解决了这个问题。。希望作者的库越来越好。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.