{"action":"opened","issue":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/1809","labels_url":"https://api.github.com/repos/robolectric/robolectric/issues/1809/labels{/name}","comments_url":"https://api.github.com/repos/robolectric/robolectric/issues/1809/comments","events_url":"https://api.github.com/repos/robolectric/robolectric/issues/1809/events","html_url":"https://github.com/robolectric/robolectric/issues/1809","id":76434804,"number":1809,"title":"If an animation is run on the same view twice, onAnimationEnd() is not called the second time.","user":{"login":"erichaugh","id":1869816,"avatar_url":"https://avatars.githubusercontent.com/u/1869816?v=3","gravatar_id":"","url":"https://api.github.com/users/erichaugh","html_url":"https://github.com/erichaugh","followers_url":"https://api.github.com/users/erichaugh/followers","following_url":"https://api.github.com/users/erichaugh/following{/other_user}","gists_url":"https://api.github.com/users/erichaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/erichaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erichaugh/subscriptions","organizations_url":"https://api.github.com/users/erichaugh/orgs","repos_url":"https://api.github.com/users/erichaugh/repos","events_url":"https://api.github.com/users/erichaugh/events{/privacy}","received_events_url":"https://api.github.com/users/erichaugh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-14T17:43:03Z","updated_at":"2015-05-14T17:43:03Z","closed_at":null,"body":"Test case demonstrating the issue:\r\n\r\n  @Test\r\n  public void testTwoAnimations() {\r\n    View view = new TextView(RuntimeEnvironment.application);\r\n\r\n    final AtomicBoolean listener1OnStartCalled = new AtomicBoolean();\r\n    final AtomicBoolean listener1OnEndCalled = new AtomicBoolean();\r\n    final AtomicBoolean listener2OnStartCalled = new AtomicBoolean();\r\n    final AtomicBoolean listener2OnEndCalled = new AtomicBoolean();\r\n\r\n    AnimatorListenerAdapter listener1 = new AnimatorListenerAdapter() {\r\n      @Override\r\n      public void onAnimationStart(Animator animation) {\r\n        listener1OnStartCalled.set(true);\r\n      }\r\n\r\n      @Override\r\n      public void onAnimationEnd(Animator animation) {\r\n        listener1OnEndCalled.set(true);\r\n      }\r\n    };\r\n    AnimatorListenerAdapter listener2 = new AnimatorListenerAdapter() {\r\n      @Override\r\n      public void onAnimationStart(Animator animation) {\r\n        listener2OnStartCalled.set(true);\r\n      }\r\n\r\n      @Override\r\n      public void onAnimationEnd(Animator animation) {\r\n        listener2OnEndCalled.set(true);\r\n      }\r\n    };\r\n    view.animate()\r\n        .alpha(0f)\r\n        .setDuration(400)\r\n        .setListener(listener1).start();\r\n    view.animate()\r\n        .alpha(1f)\r\n        .setDuration(400)\r\n        .setListener(listener2).start();\r\n\r\n    assertThat(listener1OnStartCalled.get(), is(true));\r\n    assertThat(listener1OnEndCalled.get(), is(true));\r\n    assertThat(listener2OnStartCalled.get(), is(true));\r\n    assertThat(listener2OnEndCalled.get(), is(true));\r\n  }\r\n"}}