{"action":"opened","issue":{"url":"https://api.github.com/repos/rahatarmanahmed/CircularProgressView/issues/20","labels_url":"https://api.github.com/repos/rahatarmanahmed/CircularProgressView/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/rahatarmanahmed/CircularProgressView/issues/20/comments","events_url":"https://api.github.com/repos/rahatarmanahmed/CircularProgressView/issues/20/events","html_url":"https://github.com/rahatarmanahmed/CircularProgressView/issues/20","id":86593395,"number":20,"title":"CPV stops when View is reused","user":{"login":"OFmarting","id":4610756,"avatar_url":"https://avatars.githubusercontent.com/u/4610756?v=3","gravatar_id":"","url":"https://api.github.com/users/OFmarting","html_url":"https://github.com/OFmarting","followers_url":"https://api.github.com/users/OFmarting/followers","following_url":"https://api.github.com/users/OFmarting/following{/other_user}","gists_url":"https://api.github.com/users/OFmarting/gists{/gist_id}","starred_url":"https://api.github.com/users/OFmarting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OFmarting/subscriptions","organizations_url":"https://api.github.com/users/OFmarting/orgs","repos_url":"https://api.github.com/users/OFmarting/repos","events_url":"https://api.github.com/users/OFmarting/events{/privacy}","received_events_url":"https://api.github.com/users/OFmarting/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-09T13:04:51Z","updated_at":"2015-06-09T13:04:51Z","closed_at":null,"body":"Commit 8ea4a9d73edc607cbf42a932bc1811bebfc32b58 resolves the memory leak but introduces a minor issue. When using the CPV in a ListView or RecyclerView where Views are recycled/reused the CPV hangs when it gets visible the second time. The solution is to override ```onAttachedToWindow()``` and call ```startAnimation()``` there.\r\n\r\nI think you could even move the block\r\n\r\n```\r\nif(autostartAnimation)\r\n    startAnimation();\r\n```\r\nfrom ```init(AttributeSet attrs, int defStyle)``` to ```onAttachedToWindow()```."}}