{"action":"closed","issue":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/1101","labels_url":"https://api.github.com/repos/robolectric/robolectric/issues/1101/labels{/name}","comments_url":"https://api.github.com/repos/robolectric/robolectric/issues/1101/comments","events_url":"https://api.github.com/repos/robolectric/robolectric/issues/1101/events","html_url":"https://github.com/robolectric/robolectric/issues/1101","id":34360331,"number":1101,"title":"NullPointerException when using ValueAnimator","user":{"login":"adamstyrc","id":1949928,"avatar_url":"https://avatars.githubusercontent.com/u/1949928?v=3","gravatar_id":"","url":"https://api.github.com/users/adamstyrc","html_url":"https://github.com/adamstyrc","followers_url":"https://api.github.com/users/adamstyrc/followers","following_url":"https://api.github.com/users/adamstyrc/following{/other_user}","gists_url":"https://api.github.com/users/adamstyrc/gists{/gist_id}","starred_url":"https://api.github.com/users/adamstyrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamstyrc/subscriptions","organizations_url":"https://api.github.com/users/adamstyrc/orgs","repos_url":"https://api.github.com/users/adamstyrc/repos","events_url":"https://api.github.com/users/adamstyrc/events{/privacy}","received_events_url":"https://api.github.com/users/adamstyrc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-05-27T10:51:13Z","updated_at":"2015-04-24T19:28:39Z","closed_at":"2015-04-24T19:28:39Z","body":"I am using an animation for my fragment to roll in from right side and push left side fragment to left by changing width and margins of their view containers (as the animation) \r\n\r\nA bit of code:\r\n\r\n    private void animMarginChange(final View animatedView, final int newHorizontalMargin) {\r\n        final LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) animatedView.getLayoutParams();\r\n        ValueAnimator animation = ValueAnimator.ofInt(params.rightMargin, newHorizontalMargin);\r\n        animation.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\r\n            @Override\r\n            public void onAnimationUpdate(ValueAnimator valueAnimator) {\r\n                params.leftMargin = (Integer) valueAnimator.getAnimatedValue();\r\n                params.rightMargin = (Integer) valueAnimator.getAnimatedValue();\r\n                animatedView.setLayoutParams(params);\r\n            }\r\n        });\r\n        animation.setDuration(ANIM_DURATION);\r\n        animation.start();\r\n    }\r\n\r\n\r\nWhen going through test I get:\r\n\r\njava.lang.NullPointerException\r\n\tat android.animation.ValueAnimator.initAnimation(ValueAnimator.java:455)\r\n\tat android.animation.ValueAnimator.startAnimation(ValueAnimator.java:1038)\r\n\tat android.animation.ValueAnimator.end(ValueAnimator.java:964)\r\n\tat org.robolectric.shadows.ShadowValueAnimator.start(ShadowValueAnimator.java:59)\r\n\tat android.animation.ValueAnimator.start(ValueAnimator.java)\r\n\tat pl.araneo.farmadroid.view.MasterDetailLayout.animMarginChange(MasterDetailLayout.java:102)\r\n\r\nIs ValueAnimator not supported by Robolectric ? If not, are there any plans to handle it ? "}}