Giter VIP home page Giter VIP logo

Comments (9)

paul-turner avatar paul-turner commented on June 16, 2024

Also from #90
Question:

does the crash still occur if you don't have the code I provided? it seems like this issue may be separate from the changes I suggest.

Reply:

I just tested it again, thing a bit different, When I put your code things work fine even i change device configuration and browse around however after a while of running by changing back and forth the applications. The same error occurred.

When i don't use your code, things work fine.

I think the out of bound part was the problem.
Caused by: java.lang.IndexOutOfBoundsException: Invalid index 20, size is 20
There is only 20 objects, and I suppose the start index is 0.
and why in onRestoreInstanceState method the getListItem method try to access the object 20th.

from expandable-recycler-view.

vsay01 avatar vsay01 commented on June 16, 2024

I tested it again.
It crash for this situation:
after i run the application, if the child view is expanded there will be no problem when rotate devices; however if all the child view collapsed and i try to rotate the device then above crash (Index out of bound) will occurred.

There are two sample in your repository, the crime one has no problem however the vertical and horizontal sample produce error as above mention situation.

from expandable-recycler-view.

paul-turner avatar paul-turner commented on June 16, 2024

@vsay01 thanks for the information, I've pushed a snapshot with what I think is the fix. Could you give it a try and see if it fixes your problems (fixed the crash in the samples).
Use:

compile 'com.bignerdranch.android:expandablerecyclerview:2.0.4-SNAPSHOT'

from expandable-recycler-view.

vsay01 avatar vsay01 commented on June 16, 2024

@paul-turner
I used this: compile 'com.bignerdranch.android:expandablerecyclerview:2.0.4-SNAPSHOT'
When I sync project with gradle files
Error:(36, 13) Failed to resolve: com.bignerdranch.android:expandablerecyclerview:2.0.4-SNAPSHOT

from expandable-recycler-view.

paul-turner avatar paul-turner commented on June 16, 2024

Sorry forgot one step:

Add Sonatype's snapshots to your repositories closure in the root build.gradle:

allprojects {
    repositories {
        maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
    }
}

from expandable-recycler-view.

vsay01 avatar vsay01 commented on June 16, 2024

Thank @paul-turner
I used the snapshot above in sample horizontal, vertical sample, and my project it fix above issue.
So are you going to release the 2.0.4 soon?

from expandable-recycler-view.

paul-turner avatar paul-turner commented on June 16, 2024

Yes will probably release sometime tomorrow, thanks for your help

from expandable-recycler-view.

vsay01 avatar vsay01 commented on June 16, 2024

@paul-turner Thank for a useful library 👍

from expandable-recycler-view.

paul-turner avatar paul-turner commented on June 16, 2024

@vsay01 Took a little longer than anticipated (the first fix still had some problems). But 2.0.4 is released now, should pop into maven in the next couple hours.

from expandable-recycler-view.

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.