{"action":"created","issue":{"url":"https://api.github.com/repos/iPaulPro/Android-ItemTouchHelper-Demo/issues/7","labels_url":"https://api.github.com/repos/iPaulPro/Android-ItemTouchHelper-Demo/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/iPaulPro/Android-ItemTouchHelper-Demo/issues/7/comments","events_url":"https://api.github.com/repos/iPaulPro/Android-ItemTouchHelper-Demo/issues/7/events","html_url":"https://github.com/iPaulPro/Android-ItemTouchHelper-Demo/issues/7","id":95897853,"number":7,"title":"Breaks with different viewTypes","user":{"login":"scriptacus","id":503015,"avatar_url":"https://avatars.githubusercontent.com/u/503015?v=3","gravatar_id":"","url":"https://api.github.com/users/scriptacus","html_url":"https://github.com/scriptacus","followers_url":"https://api.github.com/users/scriptacus/followers","following_url":"https://api.github.com/users/scriptacus/following{/other_user}","gists_url":"https://api.github.com/users/scriptacus/gists{/gist_id}","starred_url":"https://api.github.com/users/scriptacus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scriptacus/subscriptions","organizations_url":"https://api.github.com/users/scriptacus/orgs","repos_url":"https://api.github.com/users/scriptacus/repos","events_url":"https://api.github.com/users/scriptacus/events{/privacy}","received_events_url":"https://api.github.com/users/scriptacus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/iPaulPro/Android-ItemTouchHelper-Demo/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-19T08:26:36Z","updated_at":"2015-07-19T14:43:23Z","closed_at":"2015-07-19T14:43:23Z","body":"Unfortunately, I've been unable to make this work with multiple viewTypes.  It appears that the RecyclerView scraps differing viewTypes when they are dragged over each other, which cancels the re-ordering process.  Any ideas on how to fix this?"},"comment":{"url":"https://api.github.com/repos/iPaulPro/Android-ItemTouchHelper-Demo/issues/comments/122667152","html_url":"https://github.com/iPaulPro/Android-ItemTouchHelper-Demo/issues/7#issuecomment-122667152","issue_url":"https://api.github.com/repos/iPaulPro/Android-ItemTouchHelper-Demo/issues/7","id":122667152,"user":{"login":"scriptacus","id":503015,"avatar_url":"https://avatars.githubusercontent.com/u/503015?v=3","gravatar_id":"","url":"https://api.github.com/users/scriptacus","html_url":"https://github.com/scriptacus","followers_url":"https://api.github.com/users/scriptacus/followers","following_url":"https://api.github.com/users/scriptacus/following{/other_user}","gists_url":"https://api.github.com/users/scriptacus/gists{/gist_id}","starred_url":"https://api.github.com/users/scriptacus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scriptacus/subscriptions","organizations_url":"https://api.github.com/users/scriptacus/orgs","repos_url":"https://api.github.com/users/scriptacus/repos","events_url":"https://api.github.com/users/scriptacus/events{/privacy}","received_events_url":"https://api.github.com/users/scriptacus/received_events","type":"User","site_admin":false},"created_at":"2015-07-19T14:43:23Z","updated_at":"2015-07-19T14:43:23Z","body":"Sorry for the lack of information.  If getItemViewType() returns two different types of items (A and B for example), then obviously onMove won't allow them to swap.  So as a test I commented out the block of code that you pasted above.  In the case of a view with 3 items (A, B, B), I can drag items UP without issue, (e.g. ending up with B, A, B by dragging one of the B items to the top of the list), but if I try to drag a non-matching item DOWN the item being dragged gets detached during onMove somewhere in the RecyclerView code, which cancels the drag operation.\r\n\r\nThat said, I found the issue.  I had based my implementation on your inital commit (the one that matches the tutorial, but then updated it to match the latest version.  During that process I missed the fact that onItemMove changed to using Collections.swap().  The previous method of swapping is what was causing the issue."}}