{"action":"created","issue":{"url":"https://api.github.com/repos/cymcsg/UltimateRecyclerView/issues/193","labels_url":"https://api.github.com/repos/cymcsg/UltimateRecyclerView/issues/193/labels{/name}","comments_url":"https://api.github.com/repos/cymcsg/UltimateRecyclerView/issues/193/comments","events_url":"https://api.github.com/repos/cymcsg/UltimateRecyclerView/issues/193/events","html_url":"https://github.com/cymcsg/UltimateRecyclerView/issues/193","id":106803842,"number":193,"title":"Position in DataBinder possibly wrong?","user":{"login":"kientux","id":4200743,"avatar_url":"https://avatars.githubusercontent.com/u/4200743?v=3","gravatar_id":"","url":"https://api.github.com/users/kientux","html_url":"https://github.com/kientux","followers_url":"https://api.github.com/users/kientux/followers","following_url":"https://api.github.com/users/kientux/following{/other_user}","gists_url":"https://api.github.com/users/kientux/gists{/gist_id}","starred_url":"https://api.github.com/users/kientux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kientux/subscriptions","organizations_url":"https://api.github.com/users/kientux/orgs","repos_url":"https://api.github.com/users/kientux/repos","events_url":"https://api.github.com/users/kientux/events{/privacy}","received_events_url":"https://api.github.com/users/kientux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-16T15:55:37Z","updated_at":"2016-01-03T12:03:08Z","closed_at":null,"body":"First, sorry for my bad English.\r\n\r\nI was successfully implement `UltimateDifferentViewTypeAdapter` to support multiple view type in recycler view (I have 3 view types). But in this method:\r\n\r\n```java\r\npublic class MyDataBinder extends DataBinder<MyDataBinder.MyViewHolder> {\r\n    ....\r\n\r\n    @Override\r\n    public void bindViewHolder(MyViewHolder holder, int position) {\r\n        Log.d(TAG, String.valueOf(position));\r\n        MyData data = dataList.get(position);\r\n    }\r\n\r\n}\r\n```\r\n\r\n`position` here is not the position of `MyViewHolder` in recycler view. If I get object from `dataList` with that position, the object might be wrong.\r\n\r\nFor example, I have an array: [1, a, 2, b, 3, c]\r\nwith 2 view types `NumberViewHolder` and `CharacterViewHolder`.\r\n\r\n`position` in `DataBinder` of `NumberViewHolder` will be 0 - 1 - 2; and it supposed to be 0 - 2 - 4.\r\n`position` in `DataBinder` of `CharacterViewHolder` will be 0 - 1 - 2; and it supposed to be 1 - 3 - 5.\r\n\r\nI mean, it's like you split the array into 2 array based on which view type, then get position from each array, not from original array.\r\n\r\nIn your example app, `MultiViewTypesActivity` shows each data **two** times because of this. I don't know if this is a bug or just the code design?"},"comment":{"url":"https://api.github.com/repos/cymcsg/UltimateRecyclerView/issues/comments/168491987","html_url":"https://github.com/cymcsg/UltimateRecyclerView/issues/193#issuecomment-168491987","issue_url":"https://api.github.com/repos/cymcsg/UltimateRecyclerView/issues/193","id":168491987,"user":{"login":"netanelgilad","id":3474905,"avatar_url":"https://avatars.githubusercontent.com/u/3474905?v=3","gravatar_id":"","url":"https://api.github.com/users/netanelgilad","html_url":"https://github.com/netanelgilad","followers_url":"https://api.github.com/users/netanelgilad/followers","following_url":"https://api.github.com/users/netanelgilad/following{/other_user}","gists_url":"https://api.github.com/users/netanelgilad/gists{/gist_id}","starred_url":"https://api.github.com/users/netanelgilad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netanelgilad/subscriptions","organizations_url":"https://api.github.com/users/netanelgilad/orgs","repos_url":"https://api.github.com/users/netanelgilad/repos","events_url":"https://api.github.com/users/netanelgilad/events{/privacy}","received_events_url":"https://api.github.com/users/netanelgilad/received_events","type":"User","site_admin":false},"created_at":"2016-01-03T12:03:08Z","updated_at":"2016-01-03T12:03:08Z","body":"+1 on this. \r\n@cymcsg if you think the fix here is correct I can PR with the fix."}}