Comments (5)
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.
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.
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.
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.
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)
- Can't use convertView in headers
- addHeaderView() not working correctly HOT 1
- Programmatically scroll to section header HOT 3
- Populating header and row dynamically HOT 2
- keep scroll position
- first header remains constant when new adapter set HOT 3
- Hiding the Toolbar (not ActionBar) when you scroll
- Non Sticky Headers HOT 1
- No highlight/ripple
- Is it possible to stop the scrolling? HOT 2
- Is it possible to set a listener for the scrolling? HOT 2
- Is there any option for making search? HOT 1
- Demo crashing - patched HOT 1
- No picture to show?
- Add support for infinite scrolling
- java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()' on a null object reference
- How to make the section adapter to accept cursor? HOT 1
- Adding Custom OnScrollListener forcing the section header scrolling HOT 1
- Scroll up force SwipeRefreshLayout to refresh HOT 2
- java.lang.ArrayIndexOutOfBoundsException: length=12; index=-1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from headerlistview.