Coder Social home page Coder Social logo

Comments (5)

mauriciogior avatar mauriciogior commented on August 12, 2024 1

Another solution is to use tag instead of id.

Your layout file

<com.applidium.headerlistview.HeaderListView
            android:tag="yourTag"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

Your java file

HeaderListView yourListView = (HeaderListView) findViewWithTag("yourTag");

from headerlistview.

Slangen avatar Slangen commented on August 12, 2024

Same issue here. Except i'm not using fragments. I have a HeaderListView in one of my activities and i am now receiving this on GooglePlay every once in a while:

java.lang.RuntimeException: Unable to start activity ComponentInfo{se.creativecamp.android/*.BookActivity}: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.widget.AbsListView$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/book_list. Make sure other views do not use the same id.

I believe i am using the latest version of HeaderListView.

from headerlistview.

oarshad avatar oarshad commented on August 12, 2024

I had the same issue, where I am using HeaderListView inside a fragment and my application crashes every time when switching between Landscape and Portrait Orientation.
The solution by @aaearon has helped and now it is working using this line of code.

headerListView.getListView().setId(R.id.listMode);

The id here can be anything.

from headerlistview.

bendaf avatar bendaf commented on August 12, 2024

Same problem here when using DialogFragment. It also seem to appear only on specific devices. I cannot reproduce it on LG G4, but I can on Nexus 4 for example.

I think it can be fixed easily according to this StackOverflow post: http://stackoverflow.com/questions/24297279/wrong-state-class-expecting-view-state-but
I don't have time for it currently, so if you can do it, please notify me :)

from headerlistview.

bendaf avatar bendaf commented on August 12, 2024

And this post is also related to this issue:
http://stackoverflow.com/questions/25337592/android-id-clash-when-3-tabs-or-more-are-created

from headerlistview.

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.