{"action":"created","issue":{"url":"https://api.github.com/repos/kanytu/android-parallax-recyclerview/issues/13","labels_url":"https://api.github.com/repos/kanytu/android-parallax-recyclerview/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/kanytu/android-parallax-recyclerview/issues/13/comments","events_url":"https://api.github.com/repos/kanytu/android-parallax-recyclerview/issues/13/events","html_url":"https://github.com/kanytu/android-parallax-recyclerview/issues/13","id":63722568,"number":13,"title":"List items overlapping header when removing an item","user":{"login":"manujosephv","id":10508493,"avatar_url":"https://avatars.githubusercontent.com/u/10508493?v=3","gravatar_id":"","url":"https://api.github.com/users/manujosephv","html_url":"https://github.com/manujosephv","followers_url":"https://api.github.com/users/manujosephv/followers","following_url":"https://api.github.com/users/manujosephv/following{/other_user}","gists_url":"https://api.github.com/users/manujosephv/gists{/gist_id}","starred_url":"https://api.github.com/users/manujosephv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manujosephv/subscriptions","organizations_url":"https://api.github.com/users/manujosephv/orgs","repos_url":"https://api.github.com/users/manujosephv/repos","events_url":"https://api.github.com/users/manujosephv/events{/privacy}","received_events_url":"https://api.github.com/users/manujosephv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-23T13:26:48Z","updated_at":"2015-03-25T10:51:48Z","closed_at":null,"body":"Hi There,\r\nI have used your Parallax RecyclerView to load data from a cursor. I have modified the adapter to use a cursor instead of the List  that is there by default. \r\n\r\nI have modified the removeItem method too like below.\r\n\r\n```java\r\npublic void removeItem(int position) {\r\n    if (position < 0)\r\n        return;\r\n    notifyItemRemoved(position + (mHeader == null ? 0 : 1));\r\n```\r\nin the loaderFinished method, I swap the cursor and update the header values. in the existing adapter(not create a new adapter and swap adapter at recyclerview level)\r\n\r\nThis seems to be working perfectly, except for the UI. The values are updating correctly, but the list items seems to be overlapping the header after an item is removed.\r\n\r\nThis does not happen if the recyclerview is scrolled all the way to the top. But in any other position, it gives me something like this, with the list items overlapping the header (see below)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/10508493/6780634/03a3c3dc-d18d-11e4-96f6-f7d042a1f367.png)\r\n\r\nThis is the ideal behavior\r\n![image](https://cloud.githubusercontent.com/assets/10508493/6780648/2bb9cc0e-d18d-11e4-9d97-50b0132c901a.png)\r\n\r\n\r\nLet me know if you want the entire code of the Adapter I am using(the modified one)"},"comment":{"url":"https://api.github.com/repos/kanytu/android-parallax-recyclerview/issues/comments/85981056","html_url":"https://github.com/kanytu/android-parallax-recyclerview/issues/13#issuecomment-85981056","issue_url":"https://api.github.com/repos/kanytu/android-parallax-recyclerview/issues/13","id":85981056,"user":{"login":"manujosephv","id":10508493,"avatar_url":"https://avatars.githubusercontent.com/u/10508493?v=3","gravatar_id":"","url":"https://api.github.com/users/manujosephv","html_url":"https://github.com/manujosephv","followers_url":"https://api.github.com/users/manujosephv/followers","following_url":"https://api.github.com/users/manujosephv/following{/other_user}","gists_url":"https://api.github.com/users/manujosephv/gists{/gist_id}","starred_url":"https://api.github.com/users/manujosephv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manujosephv/subscriptions","organizations_url":"https://api.github.com/users/manujosephv/orgs","repos_url":"https://api.github.com/users/manujosephv/repos","events_url":"https://api.github.com/users/manujosephv/events{/privacy}","received_events_url":"https://api.github.com/users/manujosephv/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T10:51:48Z","updated_at":"2015-03-25T10:51:48Z","body":"Hey,\n\nI did some testing. There are two different undesirable behavior -\n1. Overlap of content with the header\n2. Empty space (equal to the row height) just below the header.\n\nThese are some conditions when I got these screens\n1. Scroll Position : Top, Delete top item : OK\n2. Scroll Position : Top, Delete second item : Empty Space\n3. Scroll Position : Mid(header visible), Delete first item : OK\n4. Scroll Position : Mid(header visible), Delete second item : Overlap\n5. Scroll Position: Min (header not visible), Delete a middle item(not\nfirst, not last) : Empty Space\n6. Scroll Position: Bottom, delete any item: Overlap\n\nHope this helps.\n\n\n\nOn Wed, Mar 25, 2015 at 9:31 AM, Manu Joseph <manujosephv@gmail.com> wrote:\n\n> Sure man. I'll do some more testing and get back to you.\n> On Mar 24, 2015 11:47 PM, \"Pedro Oliveira\" <notifications@github.com>\n> wrote:\n>\n>> Can you make a little more tests please?\n>>\n>> I tested and sometimes it's working and sometimes it's not. It depends on\n>> the scroll position. Also what item are you removing?\n>>\n>> I will keep testing tomorrow and hopeful find a fix.\n>>\n>> —\n>> Reply to this email directly or view it on GitHub\n>> <https://github.com/kanytu/android-parallax-recyclerview/issues/13#issuecomment-85629108>\n>> .\n>>\n>\n"}}