Giter VIP home page Giter VIP logo

Comments (9)

ValeryGes avatar ValeryGes commented on June 29, 2024

Hi, @wang727955603!

Thank you for using our library. We will investigate this issue and fix it as soon as possible.
If you can provide your xml and java code of using our library - it can help us.

With best regards, Cleveroad team.

from loopbar.

wang727955603 avatar wang727955603 commented on June 29, 2024

@ValeryGes I send a email to [email protected], you can check it.

from loopbar.

ValeryGes avatar ValeryGes commented on June 29, 2024

@wang727955603, resend please it to [email protected] (with email subject: "LoopBar. Support request.").
[email protected] - is not for replying.

from loopbar.

wang727955603 avatar wang727955603 commented on June 29, 2024

@ValeryGes ok

from loopbar.

wang727955603 avatar wang727955603 commented on June 29, 2024

@ValeryGes I solved this problem。change some code in LoopBarView.java like this:
public static class SavedState extends BaseSavedState {

    public static final Parcelable.Creator<SavedState> CREATOR = new Parcelable.Creator<SavedState>() {

        public SavedState createFromParcel(Parcel in) {
            return new SavedState(in);
        }

        public SavedState[] newArray(int size) {
            return new SavedState[size];
        }
    };
    private int mCurrentItemPosition;
    @GravityAttr
    private int mSelectionGravity;
    @ScrollAttr
    private int mScrollMode;
    private boolean mIsInfinite;
    private int mAdapterSize;

    public SavedState(Parcelable superState) {
        super(superState);
    }


    @SuppressWarnings("unused")
    private SavedState(Parcel parcel) {
        super(parcel);
        mCurrentItemPosition = parcel.readInt();
        @GravityAttr
        int gravity = parcel.readInt();
        mSelectionGravity = gravity;
        @ScrollAttr
        int scrollMode = parcel.readInt();
        mScrollMode = scrollMode;
        boolean[] booleanValues = new boolean[1];
        parcel.readBooleanArray(booleanValues);
        mIsInfinite = booleanValues[0];
        mAdapterSize = parcel.readInt();
    }

    SavedState(Parcelable superState, int currentItemPosition,
               int selectionGravity, boolean isInfinite, int scrollMode, int adapterSize) {
        super(superState);
        mCurrentItemPosition = currentItemPosition;
        mSelectionGravity = selectionGravity;
        mIsInfinite = isInfinite;
        mScrollMode = scrollMode;
        mAdapterSize = adapterSize;
    }

    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int flags) {
        super.writeToParcel(parcel,flags);
        parcel.writeInt(mCurrentItemPosition);
        parcel.writeInt(mSelectionGravity);
        parcel.writeInt(mScrollMode);
        parcel.writeBooleanArray(new boolean[]{mIsInfinite});
        parcel.writeInt(mAdapterSize);
    }
}

from loopbar.

YesilHilalYazilim avatar YesilHilalYazilim commented on June 29, 2024

same error happend to me

from loopbar.

wang727955603 avatar wang727955603 commented on June 29, 2024

@YesilHilalYazilim the last item like i said, i solved this problem, did it not work for you?

from loopbar.

YesilHilalYazilim avatar YesilHilalYazilim commented on June 29, 2024

Actually, I didnt face to face with this error... I have live app.
My user getting this error a lot... I released patch with your solution waiting result

from loopbar.

wang727955603 avatar wang727955603 commented on June 29, 2024

@YesilHilalYazilim
If we put app in the background, its state is onStop or OnPause(to my phone is onStop state), then we open many other apps, increase the usage of memory and CPU. Due to competition for resources, the system will destroy this app, and the app will call the method of onSaveInstanceState() by itself, when we open it again, it will call onRestoreInstanceState(), and this time it will lead to the error.

from loopbar.

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.