{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/1132","labels_url":"https://api.github.com/repos/facebook/react-native/issues/1132/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/1132/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/1132/events","html_url":"https://github.com/facebook/react-native/issues/1132","id":72975513,"number":1132,"title":"how to animate 'opacity' from 1.0 to 0.2?","user":{"login":"heimasi","id":5692245,"avatar_url":"https://avatars.githubusercontent.com/u/5692245?v=3","gravatar_id":"","url":"https://api.github.com/users/heimasi","html_url":"https://github.com/heimasi","followers_url":"https://api.github.com/users/heimasi/followers","following_url":"https://api.github.com/users/heimasi/following{/other_user}","gists_url":"https://api.github.com/users/heimasi/gists{/gist_id}","starred_url":"https://api.github.com/users/heimasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heimasi/subscriptions","organizations_url":"https://api.github.com/users/heimasi/orgs","repos_url":"https://api.github.com/users/heimasi/repos","events_url":"https://api.github.com/users/heimasi/events{/privacy}","received_events_url":"https://api.github.com/users/heimasi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-04T09:48:03Z","updated_at":"2015-05-05T01:39:19Z","closed_at":"2015-05-04T19:07:27Z","body":"AnimationExperimental.startAnimation({\r\n      node: this.refs.logos,\r\n      duration: 500,\r\n      easing: 'easeInOutQuad',\r\n      property: 'opacity',\r\n      toValue: 0.2,\r\n});\r\n\r\nthis is my code. when the animation begin, its's opacity will be changed to 0.0 firstly, then it is changed from 0.0 to 0.2. How to animate the opacity from 1.0 to 0.2? thanks"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/98902385","html_url":"https://github.com/facebook/react-native/issues/1132#issuecomment-98902385","issue_url":"https://api.github.com/repos/facebook/react-native/issues/1132","id":98902385,"user":{"login":"muzix","id":1668092,"avatar_url":"https://avatars.githubusercontent.com/u/1668092?v=3","gravatar_id":"","url":"https://api.github.com/users/muzix","html_url":"https://github.com/muzix","followers_url":"https://api.github.com/users/muzix/followers","following_url":"https://api.github.com/users/muzix/following{/other_user}","gists_url":"https://api.github.com/users/muzix/gists{/gist_id}","starred_url":"https://api.github.com/users/muzix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muzix/subscriptions","organizations_url":"https://api.github.com/users/muzix/orgs","repos_url":"https://api.github.com/users/muzix/repos","events_url":"https://api.github.com/users/muzix/events{/privacy}","received_events_url":"https://api.github.com/users/muzix/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T01:39:19Z","updated_at":"2015-05-05T01:39:19Z","body":"@heimasi @frantic \r\nI'm also had same problem. Opacity animating correctly from 0.0 to 1.0 but it's doesn't work when animating from 1.0 back to 0.0\r\n\r\nSo i looked into RCTAnimationExperimentalManager.m and i think it's because of \"fromValue\" not being typecast correctly as \"toValue\".\r\n\r\nswitch (typeName[0]) {\r\n#define CASE(encoding, type) \\\r\n          case encoding: { \\\r\n            type value; \\\r\n            [toValue getValue:&value]; \\\r\n            toFields[0] = value; \\\r\n            break; \\\r\n          }\r\n\r\n          CASE('i', int)\r\n          CASE('I', unsigned int)\r\n          CASE('s', short)\r\n          CASE('S', unsigned short)\r\n          CASE('l', long)\r\n          CASE('L', unsigned long)\r\n          CASE('q', long long)\r\n          CASE('Q', unsigned long long)\r\n\r\n#undef CASE\r\n\r\n        default:\r\n          [toValue getValue:toFields];\r\n          break;\r\n      }\r\n\r\nmoreover, I think float and double datatype is missing in above code \r\n          CASE('f', float)\r\n          CASE('d', double)\r\n\r\nSo, i commented out line: [fromValue getValue:fromFields];\r\nand replace it with below:\r\nswitch (fromTypeName[0]) {\r\n#define CASE(encoding, type) \\\r\n          case encoding: { \\\r\n            type value; \\\r\n            [fromValue getValue:&value]; \\\r\n            fromFields[0] = value; \\\r\n            break; \\\r\n          }\r\n                            \r\n          CASE('i', int)\r\n          CASE('I', unsigned int)\r\n          CASE('s', short)\r\n          CASE('S', unsigned short)\r\n          CASE('l', long)\r\n          CASE('L', unsigned long)\r\n          CASE('q', long long)\r\n          CASE('Q', unsigned long long)\r\n          CASE('f', float)\r\n          CASE('d', double)\r\n                \r\n#undef CASE\r\n          default:\r\n            [fromValue getValue:fromFields];\r\n            break;\r\n        }\r\n\r\nThen, animation worked correctly. \r\n"}}