-
Notifications
You must be signed in to change notification settings - Fork 1.5k
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If list position is retained on rotation header get unstuck #24
Comments
I'm able to save the list position and restore it after screen rotation, so it works fine for me. |
Sure, I save list position like this: @OverRide @OverRide @OverRide private void renewListPosition() {
|
I use |
The problem is do that in onSavedInstanceState when using fragments using the compatibility library is the onSavedInstanceState is called after onPause which gives you a content view not created error |
on what version of android are you seeing this? |
4.1.1 |
I just want to clarify the issue, when setting the selection after rotation, the headers are no longer sticky? |
Yes that is correct, Ive moved to say position 15 and the header is now back to the top of the list, adding some logs I notice that the header on rotation is now null |
And you have the list inside a support fragment? Anything more i need to know? Setting up a test project now to try to replicate this |
Nope thats about it. |
ok, so i tried but it seems to be working just fine. Could you maybe zip up a test project where you are seeing this problem and send it to me so i could take a look? |
Another thing is I'm using a cursor loader to set the adapter, I'll send some code over to you. |
Its very strange, I modified the example app to use the same code I'm using in the project, but the issue cant be reproduced, I'm going to test it a bit more, and if I cant reproduce it Ill close the issue. |
sounds good :) |
If a list has only a single header on the page this issue seems to occur, if theres more than a single header its fine |
I just tried this with only a single header and still not seeing it. I think i will need a zipped test project where this issue is present. |
Well, I cannot provide one as it doesn't happen on my phone. But it's easy to see by looking at your code that if you get 2 pushes without a pull, you will pull the wrong item of the cache. It's been a long time, but your code seems to assume that you will get a push and a pull paired. |
Many things have been remade since this issue was posted and i have never been able to reproduce it so i am closing it. Please submit another issue if you still see this with the newest version |
If I store the position of the listview in saved instance state and then rotate and set selection of the listview the header is back to the top of the list and scrolls with the list, the issue is fixed if I scroll back upt to the top of the list and then rotate.
The text was updated successfully, but these errors were encountered: