{"action":"created","comment":{"url":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments/49341377","id":49341377,"diff_hunk":"@@ -75,16 +66,20 @@ public MapController(Activity mainApp, MapView view, String sceneFilePath) {\n         mainApp.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);\n         assetManager = mainApp.getAssets();\n \n-        // Set up gesture recognizers\n-        gestureDetector = new GestureDetector(mainApp, this);\n-        scaleGestureDetector = new ScaleGestureDetector(mainApp, this);\n-        rotateGestureDetector = new RotateGestureDetector(mainApp, this);\n-        shoveGestureDetector = new ShoveGestureDetector(mainApp, this);\n-        gestureDetector.setOnDoubleTapListener(this);\n+        touchManager = new TouchManager(mainApp);\n+        setPanResponder(null);\n+        setScaleResponder(null);\n+        setRotateResponder(null);\n+        setShoveResponder(null);\n+\n+        touchManager.setSimultaneousDetectionAllowed(Gestures.SHOVE, Gestures.ROTATE, false);\n+        touchManager.setSimultaneousDetectionAllowed(Gestures.ROTATE, Gestures.SHOVE, false);\n+        touchManager.setSimultaneousDetectionAllowed(Gestures.SHOVE, Gestures.SCALE, false);","path":"android/tangram/src/com/mapzen/tangram/MapController.java","position":49,"original_position":49,"commit_id":"ecc443bd7ba09b7e31d506905ad09a6a52db0f19","original_commit_id":"ecc443bd7ba09b7e31d506905ad09a6a52db0f19","user":{"login":"tallytalwar","id":360641,"avatar_url":"https://avatars.githubusercontent.com/u/360641?v=3","gravatar_id":"","url":"https://api.github.com/users/tallytalwar","html_url":"https://github.com/tallytalwar","followers_url":"https://api.github.com/users/tallytalwar/followers","following_url":"https://api.github.com/users/tallytalwar/following{/other_user}","gists_url":"https://api.github.com/users/tallytalwar/gists{/gist_id}","starred_url":"https://api.github.com/users/tallytalwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tallytalwar/subscriptions","organizations_url":"https://api.github.com/users/tallytalwar/orgs","repos_url":"https://api.github.com/users/tallytalwar/repos","events_url":"https://api.github.com/users/tallytalwar/events{/privacy}","received_events_url":"https://api.github.com/users/tallytalwar/received_events","type":"User","site_admin":false},"body":"And another thing, `LONG_PRESS` gesture should be disallowed after `SCALE` gesture has started.","created_at":"2016-01-11T16:25:36Z","updated_at":"2016-01-11T16:25:36Z","html_url":"https://github.com/tangrams/tangram-es/pull/454#discussion_r49341377","pull_request_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/454","_links":{"self":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments/49341377"},"html":{"href":"https://github.com/tangrams/tangram-es/pull/454#discussion_r49341377"},"pull_request":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/454"}}},"pull_request":{"url":"https://api.github.com/repos/tangrams/tangram-es/pulls/454","id":55155455,"html_url":"https://github.com/tangrams/tangram-es/pull/454","diff_url":"https://github.com/tangrams/tangram-es/pull/454.diff","patch_url":"https://github.com/tangrams/tangram-es/pull/454.patch","issue_url":"https://api.github.com/repos/tangrams/tangram-es/issues/454","number":454,"state":"open","locked":false,"title":"Refactor touch input management","user":{"login":"blair1618","id":3371850,"avatar_url":"https://avatars.githubusercontent.com/u/3371850?v=3","gravatar_id":"","url":"https://api.github.com/users/blair1618","html_url":"https://github.com/blair1618","followers_url":"https://api.github.com/users/blair1618/followers","following_url":"https://api.github.com/users/blair1618/following{/other_user}","gists_url":"https://api.github.com/users/blair1618/gists{/gist_id}","starred_url":"https://api.github.com/users/blair1618/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blair1618/subscriptions","organizations_url":"https://api.github.com/users/blair1618/orgs","repos_url":"https://api.github.com/users/blair1618/repos","events_url":"https://api.github.com/users/blair1618/events{/privacy}","received_events_url":"https://api.github.com/users/blair1618/received_events","type":"User","site_admin":false},"body":"This is an overhaul of the code that responds to input events on all platforms, with a particular focus on Android touch input. \r\n\r\n - Android input is now handled by the new class `TouchManager`\r\n - Gesture exclusivity can be managed at run-time via `TouchManager` (i.e. we can freely set which gestures are allowed to be recognized while another gesture is in progress)\r\n - Callbacks can be set for all available gesture types via `MapController`\r\n - A logic error in the calculation of scaling \"fling\" has been fixed\r\n - Input units for \"shove\" are now consistent with other input functions\r\n - 3rd-party gesture recognizer code is now consistently styled\r\n - Pan flinging is now handled by an explicit callback at the end of a pan gesture, instead of being inferred\r\n - Flings now correctly interpolate with the time step between frames\r\n\r\nThis touches many lines of code, but the result is quite a major improvement in code quality and input behavior. \r\n\r\nThe most important feedback for this is comments on \"feel\". Try out every combination of gestures you can think of and see if there are any edge cases that feel wrong. ","created_at":"2016-01-05T22:58:59Z","updated_at":"2016-01-11T16:25:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"575331b3e9d53f8580d0ef1ed4ebe31ed52c91f6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/454/commits","review_comments_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/454/comments","review_comment_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/issues/454/comments","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/ecc443bd7ba09b7e31d506905ad09a6a52db0f19","head":{"label":"tangrams:android-touch-manager","ref":"android-touch-manager","sha":"ecc443bd7ba09b7e31d506905ad09a6a52db0f19","user":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"repo":{"id":23391501,"name":"tangram-es","full_name":"tangrams/tangram-es","owner":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangrams/tangram-es","description":"2D and 3D map renderer using OpenGL ES","fork":false,"url":"https://api.github.com/repos/tangrams/tangram-es","forks_url":"https://api.github.com/repos/tangrams/tangram-es/forks","keys_url":"https://api.github.com/repos/tangrams/tangram-es/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangrams/tangram-es/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangrams/tangram-es/teams","hooks_url":"https://api.github.com/repos/tangrams/tangram-es/hooks","issue_events_url":"https://api.github.com/repos/tangrams/tangram-es/issues/events{/number}","events_url":"https://api.github.com/repos/tangrams/tangram-es/events","assignees_url":"https://api.github.com/repos/tangrams/tangram-es/assignees{/user}","branches_url":"https://api.github.com/repos/tangrams/tangram-es/branches{/branch}","tags_url":"https://api.github.com/repos/tangrams/tangram-es/tags","blobs_url":"https://api.github.com/repos/tangrams/tangram-es/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangrams/tangram-es/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangrams/tangram-es/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangrams/tangram-es/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/{sha}","languages_url":"https://api.github.com/repos/tangrams/tangram-es/languages","stargazers_url":"https://api.github.com/repos/tangrams/tangram-es/stargazers","contributors_url":"https://api.github.com/repos/tangrams/tangram-es/contributors","subscribers_url":"https://api.github.com/repos/tangrams/tangram-es/subscribers","subscription_url":"https://api.github.com/repos/tangrams/tangram-es/subscription","commits_url":"https://api.github.com/repos/tangrams/tangram-es/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangrams/tangram-es/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangrams/tangram-es/issues/comments{/number}","contents_url":"https://api.github.com/repos/tangrams/tangram-es/contents/{+path}","compare_url":"https://api.github.com/repos/tangrams/tangram-es/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangrams/tangram-es/merges","archive_url":"https://api.github.com/repos/tangrams/tangram-es/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangrams/tangram-es/downloads","issues_url":"https://api.github.com/repos/tangrams/tangram-es/issues{/number}","pulls_url":"https://api.github.com/repos/tangrams/tangram-es/pulls{/number}","milestones_url":"https://api.github.com/repos/tangrams/tangram-es/milestones{/number}","notifications_url":"https://api.github.com/repos/tangrams/tangram-es/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangrams/tangram-es/labels{/name}","releases_url":"https://api.github.com/repos/tangrams/tangram-es/releases{/id}","created_at":"2014-08-27T13:56:56Z","updated_at":"2015-12-22T18:48:35Z","pushed_at":"2016-01-11T15:33:00Z","git_url":"git://github.com/tangrams/tangram-es.git","ssh_url":"git@github.com:tangrams/tangram-es.git","clone_url":"https://github.com/tangrams/tangram-es.git","svn_url":"https://github.com/tangrams/tangram-es","homepage":"","size":28466,"stargazers_count":81,"watchers_count":81,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":22,"forks":24,"open_issues":22,"watchers":81,"default_branch":"master"}},"base":{"label":"tangrams:master","ref":"master","sha":"e3ae56013fc51c110feb00b2cff64b85f5f72511","user":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"repo":{"id":23391501,"name":"tangram-es","full_name":"tangrams/tangram-es","owner":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangrams/tangram-es","description":"2D and 3D map renderer using OpenGL ES","fork":false,"url":"https://api.github.com/repos/tangrams/tangram-es","forks_url":"https://api.github.com/repos/tangrams/tangram-es/forks","keys_url":"https://api.github.com/repos/tangrams/tangram-es/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangrams/tangram-es/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangrams/tangram-es/teams","hooks_url":"https://api.github.com/repos/tangrams/tangram-es/hooks","issue_events_url":"https://api.github.com/repos/tangrams/tangram-es/issues/events{/number}","events_url":"https://api.github.com/repos/tangrams/tangram-es/events","assignees_url":"https://api.github.com/repos/tangrams/tangram-es/assignees{/user}","branches_url":"https://api.github.com/repos/tangrams/tangram-es/branches{/branch}","tags_url":"https://api.github.com/repos/tangrams/tangram-es/tags","blobs_url":"https://api.github.com/repos/tangrams/tangram-es/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangrams/tangram-es/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangrams/tangram-es/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangrams/tangram-es/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/{sha}","languages_url":"https://api.github.com/repos/tangrams/tangram-es/languages","stargazers_url":"https://api.github.com/repos/tangrams/tangram-es/stargazers","contributors_url":"https://api.github.com/repos/tangrams/tangram-es/contributors","subscribers_url":"https://api.github.com/repos/tangrams/tangram-es/subscribers","subscription_url":"https://api.github.com/repos/tangrams/tangram-es/subscription","commits_url":"https://api.github.com/repos/tangrams/tangram-es/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangrams/tangram-es/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangrams/tangram-es/issues/comments{/number}","contents_url":"https://api.github.com/repos/tangrams/tangram-es/contents/{+path}","compare_url":"https://api.github.com/repos/tangrams/tangram-es/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangrams/tangram-es/merges","archive_url":"https://api.github.com/repos/tangrams/tangram-es/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangrams/tangram-es/downloads","issues_url":"https://api.github.com/repos/tangrams/tangram-es/issues{/number}","pulls_url":"https://api.github.com/repos/tangrams/tangram-es/pulls{/number}","milestones_url":"https://api.github.com/repos/tangrams/tangram-es/milestones{/number}","notifications_url":"https://api.github.com/repos/tangrams/tangram-es/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangrams/tangram-es/labels{/name}","releases_url":"https://api.github.com/repos/tangrams/tangram-es/releases{/id}","created_at":"2014-08-27T13:56:56Z","updated_at":"2015-12-22T18:48:35Z","pushed_at":"2016-01-11T15:33:00Z","git_url":"git://github.com/tangrams/tangram-es.git","ssh_url":"git@github.com:tangrams/tangram-es.git","clone_url":"https://github.com/tangrams/tangram-es.git","svn_url":"https://github.com/tangrams/tangram-es","homepage":"","size":28466,"stargazers_count":81,"watchers_count":81,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":22,"forks":24,"open_issues":22,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/454"},"html":{"href":"https://github.com/tangrams/tangram-es/pull/454"},"issue":{"href":"https://api.github.com/repos/tangrams/tangram-es/issues/454"},"comments":{"href":"https://api.github.com/repos/tangrams/tangram-es/issues/454/comments"},"review_comments":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/454/comments"},"review_comment":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/454/commits"},"statuses":{"href":"https://api.github.com/repos/tangrams/tangram-es/statuses/ecc443bd7ba09b7e31d506905ad09a6a52db0f19"}}}}