{"action":"created","issue":{"url":"https://api.github.com/repos/ryanlijianchang/Recyclerview-Gallery/issues/19","repository_url":"https://api.github.com/repos/ryanlijianchang/Recyclerview-Gallery","labels_url":"https://api.github.com/repos/ryanlijianchang/Recyclerview-Gallery/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/ryanlijianchang/Recyclerview-Gallery/issues/19/comments","events_url":"https://api.github.com/repos/ryanlijianchang/Recyclerview-Gallery/issues/19/events","html_url":"https://github.com/ryanlijianchang/Recyclerview-Gallery/issues/19","id":341319205,"node_id":"MDU6SXNzdWUzNDEzMTkyMDU=","number":19,"title":"GalleryRecyclerView调用smoothScrollToPosition( )偏差","user":{"login":"saveus","id":7332306,"node_id":"MDQ6VXNlcjczMzIzMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/7332306?v=4","gravatar_id":"","url":"https://api.github.com/users/saveus","html_url":"https://github.com/saveus","followers_url":"https://api.github.com/users/saveus/followers","following_url":"https://api.github.com/users/saveus/following{/other_user}","gists_url":"https://api.github.com/users/saveus/gists{/gist_id}","starred_url":"https://api.github.com/users/saveus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saveus/subscriptions","organizations_url":"https://api.github.com/users/saveus/orgs","repos_url":"https://api.github.com/users/saveus/repos","events_url":"https://api.github.com/users/saveus/events{/privacy}","received_events_url":"https://api.github.com/users/saveus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-07-15T12:59:06Z","updated_at":"2018-08-06T01:17:09Z","closed_at":"2018-08-03T04:13:04Z","author_association":"NONE","body":"GalleryRecyclerView设置了占满屏幕每次展示一个item\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"match_parent\"\r\n并且\r\n.initPageParams(0, 0).setAnimFactor(0f)\r\n这样在使用smoothScrollToPosition( )时会出现位置偏移很多，比如需要滚动的position是4，结果会滚动到13\r\n\r\n看了下源码\r\n发现在调用滚动之前加上galleryRecyclerView.onWindowFocusChanged(true);\r\n并且把smoothScrollToPosition( )替换为scrollToPosition( )\r\n就OK了"},"comment":{"url":"https://api.github.com/repos/ryanlijianchang/Recyclerview-Gallery/issues/comments/410563700","html_url":"https://github.com/ryanlijianchang/Recyclerview-Gallery/issues/19#issuecomment-410563700","issue_url":"https://api.github.com/repos/ryanlijianchang/Recyclerview-Gallery/issues/19","id":410563700,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDU2MzcwMA==","user":{"login":"saveus","id":7332306,"node_id":"MDQ6VXNlcjczMzIzMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/7332306?v=4","gravatar_id":"","url":"https://api.github.com/users/saveus","html_url":"https://github.com/saveus","followers_url":"https://api.github.com/users/saveus/followers","following_url":"https://api.github.com/users/saveus/following{/other_user}","gists_url":"https://api.github.com/users/saveus/gists{/gist_id}","starred_url":"https://api.github.com/users/saveus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saveus/subscriptions","organizations_url":"https://api.github.com/users/saveus/orgs","repos_url":"https://api.github.com/users/saveus/repos","events_url":"https://api.github.com/users/saveus/events{/privacy}","received_events_url":"https://api.github.com/users/saveus/received_events","type":"User","site_admin":false},"created_at":"2018-08-06T01:17:09Z","updated_at":"2018-08-06T01:17:09Z","author_association":"NONE","body":"OK , Thx."}}
{"actor":{"display_login":"saveus"}}