Code Monkey home page Code Monkey logo

Comments (7)

nitrico avatar nitrico commented on August 10, 2024 1

I'm sorry it took so long... Can you guys please check if the problem is solved in version 2.3.0?

from lastadapter.

nitrico avatar nitrico commented on August 10, 2024

Hi @alenjularic

I've never seen this problem and no one else reported it. Can you please make sure you are using it correctly? I'll check it as well. Can you please let me know if you're using an ObservableList or just a regular List?

I've never actually liked the line that you mention since position 0 should be a valid position.

Thanks.

from lastadapter.

dandanx avatar dandanx commented on August 10, 2024

Same problem here, it happens only if I filter the data (less data in list) and call notifyDataSetChanged()

Caused by: java.lang.IndexOutOfBoundsException: Index: 2, Size: 1
   at java.util.ArrayList.get(ArrayList.java:411)
   at com.github.nitrico.lastadapter.LastAdapter.getType(LastAdapter.kt:178)
   at com.github.nitrico.lastadapter.LastAdapter.onViewRecycled(LastAdapter.kt:132)
   at com.github.nitrico.lastadapter.LastAdapter.onViewRecycled(LastAdapter.kt:27)
   at android.support.v7.widget.RecyclerView$Recycler.dispatchViewRecycled(RecyclerView.java:6182)

from lastadapter.

VijayMakwana avatar VijayMakwana commented on August 10, 2024

Same problem here. When the list is filtered with the less data than the previous one.

java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 10(offset:10).state:50 android.support.v7.widget.RecyclerView{a6d485 VFED..... ........ 0,0-1080,1548 #7f0900c4 app:id/rcv_news_latest}, adapter:com.github.nitrico.lastadapter.LastAdapter@fa732da, layout:android.support.v7.widget.LinearLayoutManager@a4b430b, context:com.example.main.views.MainActivity@1101dba
                                                                            at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5628)
                                                                            at android.support.v7.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:285)
                                                                            at android.support.v7.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:342)
                                                                            at android.support.v7.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:358)
                                                                            at android.support.v7.widget.GapWorker.prefetch(GapWorker.java:365)
                                                                            at android.support.v7.widget.GapWorker.run(GapWorker.java:396)
                                                                            at android.os.Handler.handleCallback(Handler.java:751)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:95)

from lastadapter.

dogs-never-lie avatar dogs-never-lie commented on August 10, 2024

Same problem. Removing item from list and causes IndexOfBound.

from lastadapter.

VijayMakwana avatar VijayMakwana commented on August 10, 2024

I still don't understand why this exception occurred but when i change my list to observable list my problem is solved.
@nitrico Please check this issue it's really a major issue.

from lastadapter.

alenjularic avatar alenjularic commented on August 10, 2024

No problem @nitrico. Yes it's fixed for me in 2.3.0. Thank you so much!

from lastadapter.

Related Issues (20)

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.