{"action":"created","comment":{"url":"https://api.github.com/repos/weefbellington/screenplay/pulls/comments/41782737","id":41782737,"diff_hunk":"@@ -1,145 +1,139 @@\n package com.davidstemmer.screenplay.flow;\n \n+import android.app.Activity;\n import android.view.View;\n import android.view.ViewGroup;\n \n-import com.davidstemmer.screenplay.SceneCut;\n import com.davidstemmer.screenplay.SceneState;\n-import com.davidstemmer.screenplay.Stage;\n import com.davidstemmer.screenplay.scene.Scene;\n+import com.davidstemmer.screenplay.util.CollectionUtils;\n \n import java.util.ArrayDeque;\n+import java.util.Collection;\n+import java.util.Deque;\n import java.util.Iterator;\n \n-import flow.Backstack;\n-import flow.Flow;\n-\n \n /**\n  * The Screenplay object handles the navigation logic for a Screenplay application.\n  */\n-public class Screenplay implements Flow.Listener {\n+public class Screenplay {\n \n     private SceneState screenState = SceneState.NORMAL;\n \n-    private final Stage stage;\n-\n-    private final ArrayDeque<Scene> previousBackstack = new ArrayDeque<>();\n+    private final Activity activity;\n+    private final ViewGroup container;\n \n-    public Screenplay(Stage stage) {\n-        this.stage = stage;\n+    public Screenplay(Activity activity, ViewGroup container) {\n+        this.activity = activity;\n+        this.container = container;\n     }\n \n-    @Override\n-    public void go(Backstack backstack, Flow.Direction direction, Flow.Callback callback) {\n+    public enum Direction {","path":"library/src/main/java/com/davidstemmer/screenplay/flow/Screenplay.java","position":45,"original_position":45,"commit_id":"381218efa7e3c41d216e9859f9c4d36bbabe0d95","original_commit_id":"381218efa7e3c41d216e9859f9c4d36bbabe0d95","user":{"login":"darussian","id":2119994,"avatar_url":"https://avatars.githubusercontent.com/u/2119994?v=3","gravatar_id":"","url":"https://api.github.com/users/darussian","html_url":"https://github.com/darussian","followers_url":"https://api.github.com/users/darussian/followers","following_url":"https://api.github.com/users/darussian/following{/other_user}","gists_url":"https://api.github.com/users/darussian/gists{/gist_id}","starred_url":"https://api.github.com/users/darussian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darussian/subscriptions","organizations_url":"https://api.github.com/users/darussian/orgs","repos_url":"https://api.github.com/users/darussian/repos","events_url":"https://api.github.com/users/darussian/events{/privacy}","received_events_url":"https://api.github.com/users/darussian/received_events","type":"User","site_admin":false},"body":"Iv been noticing a lot of hatred towards enums across the android community due to them taking up more memory than an integer. Maybe we can make this an int and use the Android annotation @Intdef to only allow certain integers to be passed in?","created_at":"2015-10-12T17:55:44Z","updated_at":"2015-10-12T17:55:44Z","html_url":"https://github.com/weefbellington/screenplay/pull/95#discussion_r41782737","pull_request_url":"https://api.github.com/repos/weefbellington/screenplay/pulls/95","_links":{"self":{"href":"https://api.github.com/repos/weefbellington/screenplay/pulls/comments/41782737"},"html":{"href":"https://github.com/weefbellington/screenplay/pull/95#discussion_r41782737"},"pull_request":{"href":"https://api.github.com/repos/weefbellington/screenplay/pulls/95"}}},"pull_request":{"url":"https://api.github.com/repos/weefbellington/screenplay/pulls/95","id":47380872,"html_url":"https://github.com/weefbellington/screenplay/pull/95","diff_url":"https://github.com/weefbellington/screenplay/pull/95.diff","patch_url":"https://github.com/weefbellington/screenplay/pull/95.patch","issue_url":"https://api.github.com/repos/weefbellington/screenplay/issues/95","number":95,"state":"open","locked":false,"title":"update to flow 0.11","user":{"login":"weefbellington","id":313286,"avatar_url":"https://avatars.githubusercontent.com/u/313286?v=3","gravatar_id":"","url":"https://api.github.com/users/weefbellington","html_url":"https://github.com/weefbellington","followers_url":"https://api.github.com/users/weefbellington/followers","following_url":"https://api.github.com/users/weefbellington/following{/other_user}","gists_url":"https://api.github.com/users/weefbellington/gists{/gist_id}","starred_url":"https://api.github.com/users/weefbellington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weefbellington/subscriptions","organizations_url":"https://api.github.com/users/weefbellington/orgs","repos_url":"https://api.github.com/users/weefbellington/repos","events_url":"https://api.github.com/users/weefbellington/events{/privacy}","received_events_url":"https://api.github.com/users/weefbellington/received_events","type":"User","site_admin":false},"body":"###### CHANGELOG\r\n\r\n1. remove the Stage interface and implementations. The activity and view container are now final variables on the Screenplay object.\r\n2. change class `SceneCut` -> `Screenplay.Transition`\r\n3. remove LayoutCompat, no longer necessary as Flow doesn't do view inflation any more\r\n4. change `Screenplay.exit` -> `Screenplay.teardownVisibleScenes`\r\n5. start to decouple screenplay from Flow. Instead of passing a Flow object directly to the Screenplay object, you now create a ScreenplayDispatcher object, which acts a bridge between Flow and Screenplay.\r\n6. Backstack helper methods removed from the Screenplay object as Screenplay no longer hold a reference to the backstack\r\n7. reorganized screenplay control flow code for better readibility\r\n8. StandardScene -> XmlScene\r\n9. Simplify the way that transition callbacks worked\r\n10. Standardized some code in the Transformer classes\r\n11. change the sample-simple project to be compatible with the new API","created_at":"2015-10-12T01:46:34Z","updated_at":"2015-10-12T17:55:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"addc09b80f6d1cfedff2861adb67ba6eb0513f91","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/weefbellington/screenplay/pulls/95/commits","review_comments_url":"https://api.github.com/repos/weefbellington/screenplay/pulls/95/comments","review_comment_url":"https://api.github.com/repos/weefbellington/screenplay/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weefbellington/screenplay/issues/95/comments","statuses_url":"https://api.github.com/repos/weefbellington/screenplay/statuses/381218efa7e3c41d216e9859f9c4d36bbabe0d95","head":{"label":"weefbellington:87","ref":"87","sha":"381218efa7e3c41d216e9859f9c4d36bbabe0d95","user":{"login":"weefbellington","id":313286,"avatar_url":"https://avatars.githubusercontent.com/u/313286?v=3","gravatar_id":"","url":"https://api.github.com/users/weefbellington","html_url":"https://github.com/weefbellington","followers_url":"https://api.github.com/users/weefbellington/followers","following_url":"https://api.github.com/users/weefbellington/following{/other_user}","gists_url":"https://api.github.com/users/weefbellington/gists{/gist_id}","starred_url":"https://api.github.com/users/weefbellington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weefbellington/subscriptions","organizations_url":"https://api.github.com/users/weefbellington/orgs","repos_url":"https://api.github.com/users/weefbellington/repos","events_url":"https://api.github.com/users/weefbellington/events{/privacy}","received_events_url":"https://api.github.com/users/weefbellington/received_events","type":"User","site_admin":false},"repo":{"id":24735413,"name":"screenplay","full_name":"weefbellington/screenplay","owner":{"login":"weefbellington","id":313286,"avatar_url":"https://avatars.githubusercontent.com/u/313286?v=3","gravatar_id":"","url":"https://api.github.com/users/weefbellington","html_url":"https://github.com/weefbellington","followers_url":"https://api.github.com/users/weefbellington/followers","following_url":"https://api.github.com/users/weefbellington/following{/other_user}","gists_url":"https://api.github.com/users/weefbellington/gists{/gist_id}","starred_url":"https://api.github.com/users/weefbellington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weefbellington/subscriptions","organizations_url":"https://api.github.com/users/weefbellington/orgs","repos_url":"https://api.github.com/users/weefbellington/repos","events_url":"https://api.github.com/users/weefbellington/events{/privacy}","received_events_url":"https://api.github.com/users/weefbellington/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/weefbellington/screenplay","description":"A minimalist framework for building Android applications, powered by Square's Flow","fork":false,"url":"https://api.github.com/repos/weefbellington/screenplay","forks_url":"https://api.github.com/repos/weefbellington/screenplay/forks","keys_url":"https://api.github.com/repos/weefbellington/screenplay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weefbellington/screenplay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weefbellington/screenplay/teams","hooks_url":"https://api.github.com/repos/weefbellington/screenplay/hooks","issue_events_url":"https://api.github.com/repos/weefbellington/screenplay/issues/events{/number}","events_url":"https://api.github.com/repos/weefbellington/screenplay/events","assignees_url":"https://api.github.com/repos/weefbellington/screenplay/assignees{/user}","branches_url":"https://api.github.com/repos/weefbellington/screenplay/branches{/branch}","tags_url":"https://api.github.com/repos/weefbellington/screenplay/tags","blobs_url":"https://api.github.com/repos/weefbellington/screenplay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weefbellington/screenplay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weefbellington/screenplay/git/refs{/sha}","trees_url":"https://api.github.com/repos/weefbellington/screenplay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weefbellington/screenplay/statuses/{sha}","languages_url":"https://api.github.com/repos/weefbellington/screenplay/languages","stargazers_url":"https://api.github.com/repos/weefbellington/screenplay/stargazers","contributors_url":"https://api.github.com/repos/weefbellington/screenplay/contributors","subscribers_url":"https://api.github.com/repos/weefbellington/screenplay/subscribers","subscription_url":"https://api.github.com/repos/weefbellington/screenplay/subscription","commits_url":"https://api.github.com/repos/weefbellington/screenplay/commits{/sha}","git_commits_url":"https://api.github.com/repos/weefbellington/screenplay/git/commits{/sha}","comments_url":"https://api.github.com/repos/weefbellington/screenplay/comments{/number}","issue_comment_url":"https://api.github.com/repos/weefbellington/screenplay/issues/comments{/number}","contents_url":"https://api.github.com/repos/weefbellington/screenplay/contents/{+path}","compare_url":"https://api.github.com/repos/weefbellington/screenplay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weefbellington/screenplay/merges","archive_url":"https://api.github.com/repos/weefbellington/screenplay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weefbellington/screenplay/downloads","issues_url":"https://api.github.com/repos/weefbellington/screenplay/issues{/number}","pulls_url":"https://api.github.com/repos/weefbellington/screenplay/pulls{/number}","milestones_url":"https://api.github.com/repos/weefbellington/screenplay/milestones{/number}","notifications_url":"https://api.github.com/repos/weefbellington/screenplay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weefbellington/screenplay/labels{/name}","releases_url":"https://api.github.com/repos/weefbellington/screenplay/releases{/id}","created_at":"2014-10-02T20:30:34Z","updated_at":"2015-10-09T14:54:03Z","pushed_at":"2015-10-12T17:01:16Z","git_url":"git://github.com/weefbellington/screenplay.git","ssh_url":"git@github.com:weefbellington/screenplay.git","clone_url":"https://github.com/weefbellington/screenplay.git","svn_url":"https://github.com/weefbellington/screenplay","homepage":"","size":1605,"stargazers_count":21,"watchers_count":21,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":9,"forks":4,"open_issues":9,"watchers":21,"default_branch":"master"}},"base":{"label":"weefbellington:master","ref":"master","sha":"b0921afad87501ea61752d83bc46a2e93c8fba2d","user":{"login":"weefbellington","id":313286,"avatar_url":"https://avatars.githubusercontent.com/u/313286?v=3","gravatar_id":"","url":"https://api.github.com/users/weefbellington","html_url":"https://github.com/weefbellington","followers_url":"https://api.github.com/users/weefbellington/followers","following_url":"https://api.github.com/users/weefbellington/following{/other_user}","gists_url":"https://api.github.com/users/weefbellington/gists{/gist_id}","starred_url":"https://api.github.com/users/weefbellington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weefbellington/subscriptions","organizations_url":"https://api.github.com/users/weefbellington/orgs","repos_url":"https://api.github.com/users/weefbellington/repos","events_url":"https://api.github.com/users/weefbellington/events{/privacy}","received_events_url":"https://api.github.com/users/weefbellington/received_events","type":"User","site_admin":false},"repo":{"id":24735413,"name":"screenplay","full_name":"weefbellington/screenplay","owner":{"login":"weefbellington","id":313286,"avatar_url":"https://avatars.githubusercontent.com/u/313286?v=3","gravatar_id":"","url":"https://api.github.com/users/weefbellington","html_url":"https://github.com/weefbellington","followers_url":"https://api.github.com/users/weefbellington/followers","following_url":"https://api.github.com/users/weefbellington/following{/other_user}","gists_url":"https://api.github.com/users/weefbellington/gists{/gist_id}","starred_url":"https://api.github.com/users/weefbellington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weefbellington/subscriptions","organizations_url":"https://api.github.com/users/weefbellington/orgs","repos_url":"https://api.github.com/users/weefbellington/repos","events_url":"https://api.github.com/users/weefbellington/events{/privacy}","received_events_url":"https://api.github.com/users/weefbellington/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/weefbellington/screenplay","description":"A minimalist framework for building Android applications, powered by Square's Flow","fork":false,"url":"https://api.github.com/repos/weefbellington/screenplay","forks_url":"https://api.github.com/repos/weefbellington/screenplay/forks","keys_url":"https://api.github.com/repos/weefbellington/screenplay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weefbellington/screenplay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weefbellington/screenplay/teams","hooks_url":"https://api.github.com/repos/weefbellington/screenplay/hooks","issue_events_url":"https://api.github.com/repos/weefbellington/screenplay/issues/events{/number}","events_url":"https://api.github.com/repos/weefbellington/screenplay/events","assignees_url":"https://api.github.com/repos/weefbellington/screenplay/assignees{/user}","branches_url":"https://api.github.com/repos/weefbellington/screenplay/branches{/branch}","tags_url":"https://api.github.com/repos/weefbellington/screenplay/tags","blobs_url":"https://api.github.com/repos/weefbellington/screenplay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weefbellington/screenplay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weefbellington/screenplay/git/refs{/sha}","trees_url":"https://api.github.com/repos/weefbellington/screenplay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weefbellington/screenplay/statuses/{sha}","languages_url":"https://api.github.com/repos/weefbellington/screenplay/languages","stargazers_url":"https://api.github.com/repos/weefbellington/screenplay/stargazers","contributors_url":"https://api.github.com/repos/weefbellington/screenplay/contributors","subscribers_url":"https://api.github.com/repos/weefbellington/screenplay/subscribers","subscription_url":"https://api.github.com/repos/weefbellington/screenplay/subscription","commits_url":"https://api.github.com/repos/weefbellington/screenplay/commits{/sha}","git_commits_url":"https://api.github.com/repos/weefbellington/screenplay/git/commits{/sha}","comments_url":"https://api.github.com/repos/weefbellington/screenplay/comments{/number}","issue_comment_url":"https://api.github.com/repos/weefbellington/screenplay/issues/comments{/number}","contents_url":"https://api.github.com/repos/weefbellington/screenplay/contents/{+path}","compare_url":"https://api.github.com/repos/weefbellington/screenplay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weefbellington/screenplay/merges","archive_url":"https://api.github.com/repos/weefbellington/screenplay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weefbellington/screenplay/downloads","issues_url":"https://api.github.com/repos/weefbellington/screenplay/issues{/number}","pulls_url":"https://api.github.com/repos/weefbellington/screenplay/pulls{/number}","milestones_url":"https://api.github.com/repos/weefbellington/screenplay/milestones{/number}","notifications_url":"https://api.github.com/repos/weefbellington/screenplay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weefbellington/screenplay/labels{/name}","releases_url":"https://api.github.com/repos/weefbellington/screenplay/releases{/id}","created_at":"2014-10-02T20:30:34Z","updated_at":"2015-10-09T14:54:03Z","pushed_at":"2015-10-12T17:01:16Z","git_url":"git://github.com/weefbellington/screenplay.git","ssh_url":"git@github.com:weefbellington/screenplay.git","clone_url":"https://github.com/weefbellington/screenplay.git","svn_url":"https://github.com/weefbellington/screenplay","homepage":"","size":1605,"stargazers_count":21,"watchers_count":21,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":9,"forks":4,"open_issues":9,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weefbellington/screenplay/pulls/95"},"html":{"href":"https://github.com/weefbellington/screenplay/pull/95"},"issue":{"href":"https://api.github.com/repos/weefbellington/screenplay/issues/95"},"comments":{"href":"https://api.github.com/repos/weefbellington/screenplay/issues/95/comments"},"review_comments":{"href":"https://api.github.com/repos/weefbellington/screenplay/pulls/95/comments"},"review_comment":{"href":"https://api.github.com/repos/weefbellington/screenplay/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weefbellington/screenplay/pulls/95/commits"},"statuses":{"href":"https://api.github.com/repos/weefbellington/screenplay/statuses/381218efa7e3c41d216e9859f9c4d36bbabe0d95"}}}}