Giter Club home page Giter Club logo

Comments (10)

BenMoment avatar BenMoment commented on August 20, 2024

I see it often too...

from staggeredgridview.

v3nko avatar v3nko commented on August 20, 2024

Fix:
Replace this constructors:

    private SavedState(Parcel in) {
        super(in);
        firstId = in.readLong();
        position = in.readInt();
        topOffsets = in.createIntArray();
        mapping = new ArrayList<ColMap>();
        in.readTypedList(mapping, ColMap.CREATOR);
    }

And

    private ColMap(Parcel in) {
        tempMap = in.createIntArray();
        values = new ArrayList<Integer>();
        for (int index = 0; index < tempMap.length; index++) {
            values.add(tempMap[index]);
        }
    }

from staggeredgridview.

 avatar commented on August 20, 2024

@q1p Thank you! It works!

from staggeredgridview.

zhmkof avatar zhmkof commented on August 20, 2024

@q1p thank you

from staggeredgridview.

xMikeTx avatar xMikeTx commented on August 20, 2024

@q1p +1 (happened when android tried to restore the activity)

from staggeredgridview.

zhmkof avatar zhmkof commented on August 20, 2024

It is not works completely. When resume the activity, it works.But if restore the activity, it is not working completely.
I use a FragmentActivvity to setup three StaggeredGridView, it happened when android tried to restore the FragmentActivity, debug info show that the second and third StaggeredGridView.SavedState.topOffsets and mapping is null when Parcelable.writeToParcel.
Is that anybody help?

from staggeredgridview.

briangriffey avatar briangriffey commented on August 20, 2024

@q1p can you package this into a pull request if you still see the problem?

from staggeredgridview.

v3nko avatar v3nko commented on August 20, 2024

@briangriffey seems it's already fixed by several of commits.

from staggeredgridview.

briangriffey avatar briangriffey commented on August 20, 2024

Closing this issue then.

from staggeredgridview.

doug-nara avatar doug-nara commented on August 20, 2024

Was there a way to reproduce this error consistently?

from staggeredgridview.

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.