{"action":"closed","issue":{"url":"https://api.github.com/repos/bluelinelabs/Conductor/issues/221","repository_url":"https://api.github.com/repos/bluelinelabs/Conductor","labels_url":"https://api.github.com/repos/bluelinelabs/Conductor/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/bluelinelabs/Conductor/issues/221/comments","events_url":"https://api.github.com/repos/bluelinelabs/Conductor/issues/221/events","html_url":"https://github.com/bluelinelabs/Conductor/issues/221","id":205699158,"number":221,"title":"RouterPagerAdapter with ChangeHandler that does not remove view","user":{"login":"cody1024d","id":5884708,"avatar_url":"https://avatars.githubusercontent.com/u/5884708?v=3","gravatar_id":"","url":"https://api.github.com/users/cody1024d","html_url":"https://github.com/cody1024d","followers_url":"https://api.github.com/users/cody1024d/followers","following_url":"https://api.github.com/users/cody1024d/following{/other_user}","gists_url":"https://api.github.com/users/cody1024d/gists{/gist_id}","starred_url":"https://api.github.com/users/cody1024d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cody1024d/subscriptions","organizations_url":"https://api.github.com/users/cody1024d/orgs","repos_url":"https://api.github.com/users/cody1024d/repos","events_url":"https://api.github.com/users/cody1024d/events{/privacy}","received_events_url":"https://api.github.com/users/cody1024d/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-02-06T20:30:54Z","updated_at":"2017-02-07T16:22:51Z","closed_at":"2017-02-07T16:22:51Z","body":"I don't mean to spam issues, but I want to address my previous issue (#220) now that I've reproduced it, and found more information about it.\r\n\r\nThe issue stems from a custom change handler, that allows me to fade in a dialog-esque view.\r\n\r\n```java\r\npublic class FadeInChangeHandler extends AnimatorChangeHandler {\r\n\r\n    public FadeInChangeHandler() {\r\n        super(false);\r\n    }\r\n\r\n    @NonNull\r\n    @Override\r\n    protected Animator getAnimator(@NonNull ViewGroup container, @Nullable View from, @Nullable View to, boolean isPush, boolean toAddedToContainer) {\r\n        AnimatorSet animator = new AnimatorSet();\r\n        if (to != null && toAddedToContainer) {\r\n            ObjectAnimator anim = ObjectAnimator.ofFloat(to, View.ALPHA, 0, 1);\r\n            anim.setDuration(250);\r\n            animator.play(anim);\r\n        }\r\n\r\n        return animator;\r\n    }\r\n\r\n    @Override\r\n    protected void resetFromView(@NonNull View from) {\r\n\r\n    }\r\n}\r\n```\r\n\r\nAs you can see, I am forcing the previous view to NOT be removed from the container, so that I can have a dialog like view displayed to the user.\r\n\r\nWhen this change handler is used to display a dialog, and THEN the user navigates to a different page in such a way that it causes the previous page to be destroyed (such as page 0 to page 2), the view stack seems to go wonky.\r\n\r\nI have re-created the issue in a fork of the demo project found here: [https://github.com/maoueh/Conductor/tree/bug/navigation-inside-view-pager-not-working](url)\r\n\r\nSteps to reproduce the view-stack I'm seeing:\r\n\r\n1. Open View Pager demo section\r\n2. On first page, hit the Dialog-Next button (top one).  This should display a text box in the middle of the screen with a gray-transparent background around the previous controller.\r\n3. Navigate to Page 2 using the view pager.\r\n4. Navigate back to Page 0 (where the dialog controller is displayed)\r\n5. Press on the textbox (or back button) to dismiss the top most controller (the dialog controller).\r\n6. Press the Clear-Next button (bottom one).  This should display a text box with a clear background.\r\n\r\nFollowing the above steps, you will see the original page displayed beneath the controller with the clear background.  However, if you were to NOT switch pages, and instead just open and close the dialog-controller, and then open the second controller, the clear-background would show as white (the window background).\r\n\r\nAll of the above leads me to believe that the RouterPagerAdapter is incorrectly saving view-state when previous views are not removed from the stack, although I could be wrong on that point.\r\n\r\n@maoueh"}}
{"actor":{"display_login":"EricKuck"}}