{"action":"closed","number":9456,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/9456","id":81718475,"html_url":"https://github.com/facebook/react-native/pull/9456","diff_url":"https://github.com/facebook/react-native/pull/9456.diff","patch_url":"https://github.com/facebook/react-native/pull/9456.patch","issue_url":"https://api.github.com/repos/facebook/react-native/issues/9456","number":9456,"state":"closed","locked":false,"title":"[Android] Implement ScrollView sticky headers on Android","user":{"login":"janicduplessis","id":2677334,"avatar_url":"https://avatars.githubusercontent.com/u/2677334?v=3","gravatar_id":"","url":"https://api.github.com/users/janicduplessis","html_url":"https://github.com/janicduplessis","followers_url":"https://api.github.com/users/janicduplessis/followers","following_url":"https://api.github.com/users/janicduplessis/following{/other_user}","gists_url":"https://api.github.com/users/janicduplessis/gists{/gist_id}","starred_url":"https://api.github.com/users/janicduplessis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicduplessis/subscriptions","organizations_url":"https://api.github.com/users/janicduplessis/orgs","repos_url":"https://api.github.com/users/janicduplessis/repos","events_url":"https://api.github.com/users/janicduplessis/events{/privacy}","received_events_url":"https://api.github.com/users/janicduplessis/received_events","type":"User","site_admin":false},"body":"This adds support for sticky headers on Android. The implementation if based primarily on the iOS one (https://github.com/facebook/react-native/blob/master/React/Views/RCTScrollView.m#L272) and adds some stuff that was missing to be able to handle z-index, view clipping, view hierarchy optimization and touch handling properly.\r\n\r\nSome notable changes:\r\n- Add `ChildDrawingOrderDelegate` interface to allow changing the `ViewGroup` drawing order using `ViewGroup#getChildDrawingOrder`. This is used to change the content view drawing order to make sure headers are drawn over the other cells. Right now I'm only reversing the drawing order as drawing only the header views last added a lot of complexity especially because of view clipping and I don't think it should cause issues.\r\n\r\n- Add `collapsableChildren` prop that works like `collapsable` but applies to every child of the view. This is needed to be able to reference sticky headers by their indices otherwise some subviews can get optimized out and break indexes.\r\n\r\n- Make `TouchTargetHelper` take drawing order into consideration when finding the touch target.\r\n\r\n- Take translate into consideration when clipping subviews.\r\n\r\n**Test plan**\r\nTested using the UIExplorer main menu on android.\r\nTested that touches get dispatched to the sticky header when over other touchable views.\r\nTested that touchables inside a sticky header work properly.","created_at":"2016-08-17T21:17:58Z","updated_at":"2016-09-16T18:18:46Z","closed_at":"2016-09-16T18:18:46Z","merged_at":null,"merge_commit_sha":"e8d91c6937476332e4619a4f81adbf9f84449c41","assignee":{"login":"astreet","id":594924,"avatar_url":"https://avatars.githubusercontent.com/u/594924?v=3","gravatar_id":"","url":"https://api.github.com/users/astreet","html_url":"https://github.com/astreet","followers_url":"https://api.github.com/users/astreet/followers","following_url":"https://api.github.com/users/astreet/following{/other_user}","gists_url":"https://api.github.com/users/astreet/gists{/gist_id}","starred_url":"https://api.github.com/users/astreet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astreet/subscriptions","organizations_url":"https://api.github.com/users/astreet/orgs","repos_url":"https://api.github.com/users/astreet/repos","events_url":"https://api.github.com/users/astreet/events{/privacy}","received_events_url":"https://api.github.com/users/astreet/received_events","type":"User","site_admin":false},"assignees":[{"login":"astreet","id":594924,"avatar_url":"https://avatars.githubusercontent.com/u/594924?v=3","gravatar_id":"","url":"https://api.github.com/users/astreet","html_url":"https://github.com/astreet","followers_url":"https://api.github.com/users/astreet/followers","following_url":"https://api.github.com/users/astreet/following{/other_user}","gists_url":"https://api.github.com/users/astreet/gists{/gist_id}","starred_url":"https://api.github.com/users/astreet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astreet/subscriptions","organizations_url":"https://api.github.com/users/astreet/orgs","repos_url":"https://api.github.com/users/astreet/repos","events_url":"https://api.github.com/users/astreet/events{/privacy}","received_events_url":"https://api.github.com/users/astreet/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react-native/pulls/9456/commits","review_comments_url":"https://api.github.com/repos/facebook/react-native/pulls/9456/comments","review_comment_url":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/9456/comments","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/51e0acceb5d451592088d3127752d1c864e38bf8","head":{"label":"janicduplessis:sticky-headers-android","ref":"sticky-headers-android","sha":"51e0acceb5d451592088d3127752d1c864e38bf8","user":{"login":"janicduplessis","id":2677334,"avatar_url":"https://avatars.githubusercontent.com/u/2677334?v=3","gravatar_id":"","url":"https://api.github.com/users/janicduplessis","html_url":"https://github.com/janicduplessis","followers_url":"https://api.github.com/users/janicduplessis/followers","following_url":"https://api.github.com/users/janicduplessis/following{/other_user}","gists_url":"https://api.github.com/users/janicduplessis/gists{/gist_id}","starred_url":"https://api.github.com/users/janicduplessis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicduplessis/subscriptions","organizations_url":"https://api.github.com/users/janicduplessis/orgs","repos_url":"https://api.github.com/users/janicduplessis/repos","events_url":"https://api.github.com/users/janicduplessis/events{/privacy}","received_events_url":"https://api.github.com/users/janicduplessis/received_events","type":"User","site_admin":false},"repo":{"id":33167181,"name":"react-native","full_name":"janicduplessis/react-native","owner":{"login":"janicduplessis","id":2677334,"avatar_url":"https://avatars.githubusercontent.com/u/2677334?v=3","gravatar_id":"","url":"https://api.github.com/users/janicduplessis","html_url":"https://github.com/janicduplessis","followers_url":"https://api.github.com/users/janicduplessis/followers","following_url":"https://api.github.com/users/janicduplessis/following{/other_user}","gists_url":"https://api.github.com/users/janicduplessis/gists{/gist_id}","starred_url":"https://api.github.com/users/janicduplessis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicduplessis/subscriptions","organizations_url":"https://api.github.com/users/janicduplessis/orgs","repos_url":"https://api.github.com/users/janicduplessis/repos","events_url":"https://api.github.com/users/janicduplessis/events{/privacy}","received_events_url":"https://api.github.com/users/janicduplessis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/janicduplessis/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/janicduplessis/react-native","forks_url":"https://api.github.com/repos/janicduplessis/react-native/forks","keys_url":"https://api.github.com/repos/janicduplessis/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/janicduplessis/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/janicduplessis/react-native/teams","hooks_url":"https://api.github.com/repos/janicduplessis/react-native/hooks","issue_events_url":"https://api.github.com/repos/janicduplessis/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/janicduplessis/react-native/events","assignees_url":"https://api.github.com/repos/janicduplessis/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/janicduplessis/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/janicduplessis/react-native/tags","blobs_url":"https://api.github.com/repos/janicduplessis/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/janicduplessis/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/janicduplessis/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/janicduplessis/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/janicduplessis/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/janicduplessis/react-native/languages","stargazers_url":"https://api.github.com/repos/janicduplessis/react-native/stargazers","contributors_url":"https://api.github.com/repos/janicduplessis/react-native/contributors","subscribers_url":"https://api.github.com/repos/janicduplessis/react-native/subscribers","subscription_url":"https://api.github.com/repos/janicduplessis/react-native/subscription","commits_url":"https://api.github.com/repos/janicduplessis/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/janicduplessis/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/janicduplessis/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/janicduplessis/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/janicduplessis/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/janicduplessis/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/janicduplessis/react-native/merges","archive_url":"https://api.github.com/repos/janicduplessis/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/janicduplessis/react-native/downloads","issues_url":"https://api.github.com/repos/janicduplessis/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/janicduplessis/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/janicduplessis/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/janicduplessis/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/janicduplessis/react-native/labels{/name}","releases_url":"https://api.github.com/repos/janicduplessis/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/janicduplessis/react-native/deployments","created_at":"2015-03-31T05:43:42Z","updated_at":"2016-08-13T18:57:25Z","pushed_at":"2016-09-14T19:55:23Z","git_url":"git://github.com/janicduplessis/react-native.git","ssh_url":"git@github.com:janicduplessis/react-native.git","clone_url":"https://github.com/janicduplessis/react-native.git","svn_url":"https://github.com/janicduplessis/react-native","homepage":"http://facebook.github.io/react-native/","size":53975,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"a6e1e33a509ff731524038a3afb19099335045ed","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":29028775,"name":"react-native","full_name":"facebook/react-native","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react-native","description":"A framework for building native apps with React.","fork":false,"url":"https://api.github.com/repos/facebook/react-native","forks_url":"https://api.github.com/repos/facebook/react-native/forks","keys_url":"https://api.github.com/repos/facebook/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react-native/teams","hooks_url":"https://api.github.com/repos/facebook/react-native/hooks","issue_events_url":"https://api.github.com/repos/facebook/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react-native/events","assignees_url":"https://api.github.com/repos/facebook/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react-native/tags","blobs_url":"https://api.github.com/repos/facebook/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react-native/languages","stargazers_url":"https://api.github.com/repos/facebook/react-native/stargazers","contributors_url":"https://api.github.com/repos/facebook/react-native/contributors","subscribers_url":"https://api.github.com/repos/facebook/react-native/subscribers","subscription_url":"https://api.github.com/repos/facebook/react-native/subscription","commits_url":"https://api.github.com/repos/facebook/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react-native/merges","archive_url":"https://api.github.com/repos/facebook/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react-native/downloads","issues_url":"https://api.github.com/repos/facebook/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react-native/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/react-native/deployments","created_at":"2015-01-09T18:10:16Z","updated_at":"2016-09-16T18:06:34Z","pushed_at":"2016-09-16T18:03:44Z","git_url":"git://github.com/facebook/react-native.git","ssh_url":"git@github.com:facebook/react-native.git","clone_url":"https://github.com/facebook/react-native.git","svn_url":"https://github.com/facebook/react-native","homepage":"http://facebook.github.io/react-native/","size":131195,"stargazers_count":37676,"watchers_count":37676,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8329,"mirror_url":null,"open_issues_count":1222,"forks":8329,"open_issues":1222,"watchers":37676,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/9456"},"html":{"href":"https://github.com/facebook/react-native/pull/9456"},"issue":{"href":"https://api.github.com/repos/facebook/react-native/issues/9456"},"comments":{"href":"https://api.github.com/repos/facebook/react-native/issues/9456/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react-native/pulls/9456/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react-native/pulls/9456/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react-native/statuses/51e0acceb5d451592088d3127752d1c864e38bf8"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":56,"review_comments":31,"commits":10,"additions":266,"deletions":24,"changed_files":14}}
{"actor":{"display_login":"janicduplessis"}}