{"action":"created","issue":{"url":"https://api.github.com/repos/sjwall/MaterialTapTargetPrompt/issues/37","repository_url":"https://api.github.com/repos/sjwall/MaterialTapTargetPrompt","labels_url":"https://api.github.com/repos/sjwall/MaterialTapTargetPrompt/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/sjwall/MaterialTapTargetPrompt/issues/37/comments","events_url":"https://api.github.com/repos/sjwall/MaterialTapTargetPrompt/issues/37/events","html_url":"https://github.com/sjwall/MaterialTapTargetPrompt/issues/37","id":204017193,"number":37,"title":"Getting NullPointer for showing prompt","user":{"login":"chinmoyeedash","id":11063982,"avatar_url":"https://avatars.githubusercontent.com/u/11063982?v=3","gravatar_id":"","url":"https://api.github.com/users/chinmoyeedash","html_url":"https://github.com/chinmoyeedash","followers_url":"https://api.github.com/users/chinmoyeedash/followers","following_url":"https://api.github.com/users/chinmoyeedash/following{/other_user}","gists_url":"https://api.github.com/users/chinmoyeedash/gists{/gist_id}","starred_url":"https://api.github.com/users/chinmoyeedash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chinmoyeedash/subscriptions","organizations_url":"https://api.github.com/users/chinmoyeedash/orgs","repos_url":"https://api.github.com/users/chinmoyeedash/repos","events_url":"https://api.github.com/users/chinmoyeedash/events{/privacy}","received_events_url":"https://api.github.com/users/chinmoyeedash/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-30T13:57:55Z","updated_at":"2017-01-31T22:17:48Z","closed_at":null,"body":"Getting Nullpointer exception with 1.8.2 as well as 1.8.1.. Target is a menuitem in actionmode. I had to update the library as i updated my compilesdkversion to 25\r\n\r\n compile 'com.android.support:appcompat-v7:25.0.0'\r\n    compile 'com.android.support:support-v4:25.0.0'\r\n    compile 'com.android.support:design:25.0.0'\r\n    compile 'uk.co.samuelwall:material-tap-target-prompt:1.8.2'\r\n\r\nI have only added this in build.gradle, not imported it as module in my project.\r\nCode is fine as it  works perfectly with design:23.0.1 and uk.co.samuelwall:material-tap-target-prompt:1.1.4\r\n\r\nSending you the error message\r\n\r\njava.lang.NullPointerException\r\n                                                                             at uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt.updateFocalCentrePosition(MaterialTapTargetPrompt.java:714)\r\n                                                                             at uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt$2.onGlobalLayout(MaterialTapTargetPrompt.java:335)\r\n                                                                             at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:859)\r\n                                                                             at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2048)\r\n                                                                             at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1234)\r\n                                                                             at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6301)\r\n                                                                             at android.view.Choreographer$CallbackRecord.run(Choreographer.java:813)\r\n                                                                             at android.view.Choreographer.doCallbacks(Choreographer.java:613)\r\n                                                                             at android.view.Choreographer.doFrame(Choreographer.java:583)\r\n                                                                             at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:799)\r\n                                                                             at android.os.Handler.handleCallback(Handler.java:733)\r\n                                                                             at android.os.Handler.dispatchMessage(Handler.java:95)\r\n                                                                             at android.os.Looper.loop(Looper.java:146)\r\n                                                                             at android.app.ActivityThread.main(ActivityThread.java:5511)\r\n                                                                             at java.lang.reflect.Method.invokeNative(Native Method)\r\n                                                                             at java.lang.reflect.Method.invoke(Method.java:515)\r\n                                                                             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)\r\n                                                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)\r\n                                                                             at dalvik.system.NativeStart.main(Native Method)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sjwall/MaterialTapTargetPrompt/issues/comments/276511233","html_url":"https://github.com/sjwall/MaterialTapTargetPrompt/issues/37#issuecomment-276511233","issue_url":"https://api.github.com/repos/sjwall/MaterialTapTargetPrompt/issues/37","id":276511233,"user":{"login":"sjwall","id":16527946,"avatar_url":"https://avatars.githubusercontent.com/u/16527946?v=3","gravatar_id":"","url":"https://api.github.com/users/sjwall","html_url":"https://github.com/sjwall","followers_url":"https://api.github.com/users/sjwall/followers","following_url":"https://api.github.com/users/sjwall/following{/other_user}","gists_url":"https://api.github.com/users/sjwall/gists{/gist_id}","starred_url":"https://api.github.com/users/sjwall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjwall/subscriptions","organizations_url":"https://api.github.com/users/sjwall/orgs","repos_url":"https://api.github.com/users/sjwall/repos","events_url":"https://api.github.com/users/sjwall/events{/privacy}","received_events_url":"https://api.github.com/users/sjwall/received_events","type":"User","site_admin":false},"created_at":"2017-01-31T22:17:48Z","updated_at":"2017-01-31T22:17:48Z","body":"The closest I can get to replicating this is `setTarget(null)`. I have made it handle this scenario gracefully in v1.8.3. If the target view is null then `builder.create()` will return null and `builder.show()` will not show the prompt.\r\n\r\nCheck that the view you are targeting is not null. Let me know if this helps, if not I will investigate further"}}
{"actor":{"display_login":"sjwall"}}