{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/shimmer-android/issues/61","repository_url":"https://api.github.com/repos/facebook/shimmer-android","labels_url":"https://api.github.com/repos/facebook/shimmer-android/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/facebook/shimmer-android/issues/61/comments","events_url":"https://api.github.com/repos/facebook/shimmer-android/issues/61/events","html_url":"https://github.com/facebook/shimmer-android/issues/61","id":344511063,"node_id":"MDU6SXNzdWUzNDQ1MTEwNjM=","number":61,"title":"startShimmer() and stopShimmer() are not starting or stopping the animation view","user":{"login":"ugokoli","id":6783334,"node_id":"MDQ6VXNlcjY3ODMzMzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/6783334?v=4","gravatar_id":"","url":"https://api.github.com/users/ugokoli","html_url":"https://github.com/ugokoli","followers_url":"https://api.github.com/users/ugokoli/followers","following_url":"https://api.github.com/users/ugokoli/following{/other_user}","gists_url":"https://api.github.com/users/ugokoli/gists{/gist_id}","starred_url":"https://api.github.com/users/ugokoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ugokoli/subscriptions","organizations_url":"https://api.github.com/users/ugokoli/orgs","repos_url":"https://api.github.com/users/ugokoli/repos","events_url":"https://api.github.com/users/ugokoli/events{/privacy}","received_events_url":"https://api.github.com/users/ugokoli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-25T16:10:38Z","updated_at":"2018-07-30T02:00:04Z","closed_at":null,"author_association":"NONE","body":"I have implemented the library, but this two scenarios are happening;\r\nFirst, when the view comes up the shimmer animation starts automatically, but when I call mShimmerFrameLayout.stopShimmer() it does not stop it.\r\nSecondly, when autoStart is disabled in the layout attribute and the view comes up, if I call mShimmerFrameLayout.startShimmer(), it does not start the animation.\r\n\r\nPlease a solution is needed."},"comment":{"url":"https://api.github.com/repos/facebook/shimmer-android/issues/comments/408726072","html_url":"https://github.com/facebook/shimmer-android/issues/61#issuecomment-408726072","issue_url":"https://api.github.com/repos/facebook/shimmer-android/issues/61","id":408726072,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODcyNjA3Mg==","user":{"login":"Mordag","id":7427545,"node_id":"MDQ6VXNlcjc0Mjc1NDU=","avatar_url":"https://avatars0.githubusercontent.com/u/7427545?v=4","gravatar_id":"","url":"https://api.github.com/users/Mordag","html_url":"https://github.com/Mordag","followers_url":"https://api.github.com/users/Mordag/followers","following_url":"https://api.github.com/users/Mordag/following{/other_user}","gists_url":"https://api.github.com/users/Mordag/gists{/gist_id}","starred_url":"https://api.github.com/users/Mordag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mordag/subscriptions","organizations_url":"https://api.github.com/users/Mordag/orgs","repos_url":"https://api.github.com/users/Mordag/repos","events_url":"https://api.github.com/users/Mordag/events{/privacy}","received_events_url":"https://api.github.com/users/Mordag/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T02:00:04Z","updated_at":"2018-07-30T02:00:04Z","author_association":"NONE","body":"@xiphirx  I have the same problem. When I call stopShimmer on my given ShimmerFrameLayout, the shimmer animation is not stopping. Internally it is calling the value animator cancel method, but it is still not stopping the animation. \r\n\r\nThe library seems to have a problem with the internal state of the ShimmerFrameLayout because it actually does not matter if I call startShimmer/stopShimmer on the view. The animation will always be executed. I tested this by simply creating a new project and including the relevant ShimmerFrameLayout without calling any methods.\r\n\r\nHere is a snippet of my code:\r\n\r\n```kotlin\r\n@JvmStatic\r\n@BindingAdapter(\"image\")\r\nfun setImage(view: ImageView, imageUrl: String?) {\r\n            imageUrl?.run {\r\n                (view.parent as? ShimmerFrameLayout)?.startShimmer()\r\n\r\n                var requestOptions = RequestOptions()\r\n                requestOptions = requestOptions.transforms(CenterCrop(), RoundedCorners(2))\r\n\r\n                GlideApp.with(view)\r\n                        .load(imageUrl)\r\n                        .centerCrop()\r\n                        .placeholder(R.drawable.preview_panel_loading_image)\r\n                        .apply(requestOptions)\r\n                        .listener(object: RequestListener<Drawable> {\r\n\r\n                            override fun onResourceReady(resource: Drawable?, model: Any?, target: Target<Drawable>?, dataSource: DataSource?, isFirstResource: Boolean): Boolean {\r\n                                (view.parent as? ShimmerFrameLayout)?.stopShimmer()\r\n                                return false\r\n                            }\r\n\r\n                            override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Drawable>?, isFirstResource: Boolean): Boolean {\r\n                                (view.parent as? ShimmerFrameLayout)?.stopShimmer()\r\n                                return false\r\n                            }\r\n                        })\r\n                        .into(view)\r\n            }\r\n        }\r\n```"}}
{"actor":{"display_login":"Mordag"}}