{"action":"closed","issue":{"url":"https://api.github.com/repos/amlcurran/ShowcaseView/issues/179","labels_url":"https://api.github.com/repos/amlcurran/ShowcaseView/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/amlcurran/ShowcaseView/issues/179/comments","events_url":"https://api.github.com/repos/amlcurran/ShowcaseView/issues/179/events","html_url":"https://github.com/amlcurran/ShowcaseView/issues/179","id":33235799,"number":179,"title":"Can't use showcaseview with Fragments, getmeasurewidth\\height is 0","user":{"login":"alexkapu","id":7360297,"avatar_url":"https://avatars.githubusercontent.com/u/7360297?v=3","gravatar_id":"","url":"https://api.github.com/users/alexkapu","html_url":"https://github.com/alexkapu","followers_url":"https://api.github.com/users/alexkapu/followers","following_url":"https://api.github.com/users/alexkapu/following{/other_user}","gists_url":"https://api.github.com/users/alexkapu/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkapu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkapu/subscriptions","organizations_url":"https://api.github.com/users/alexkapu/orgs","repos_url":"https://api.github.com/users/alexkapu/repos","events_url":"https://api.github.com/users/alexkapu/events{/privacy}","received_events_url":"https://api.github.com/users/alexkapu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2014-05-10T11:52:50Z","updated_at":"2015-11-02T21:20:52Z","closed_at":"2015-11-02T21:20:52Z","body":"I use the last version of ShowcaseView (v5.0)\r\n\r\nWhen I tried to use it with demo app and activity it works but when I tried to use it with fragments it crashes my app\r\n\r\n     @override\r\n        public void onActivityCreated(Bundle savedInstanceState) {\r\n            super.onActivityCreated(savedInstanceState);\r\n\r\n            final ImageButton saveButton = (ImageButton) view.findViewById(R.id.button_Save);\r\n            ViewTarget viewTarget = new ViewTarget(saveButton);\r\n\r\n            showcaseView = new ShowcaseView.Builder(getActivity())\r\n                    .setTarget(viewTarget)\r\n                    .setContentTitle(\"Reset Button\")\r\n                    .setContentText(\"This will erase all the data in the table except the line that in progress\")\r\n                    .build();\r\n        }\r\n\r\nwhen I tried to do the same thing in my fragmentactivity and didn't work, but when I did the same thing but took a view that declared in the fragmentactivity and not in the fragment it worked.\r\n\r\nthe error from the logcat:\r\n\r\nFATAL EXCEPTION: main\r\njava.lang.IllegalArgumentException: width and height must be > 0\r\n        at android.graphics.Bitmap.createBitmap(Bitmap.java:724)\r\n        at android.graphics.Bitmap.createBitmap(Bitmap.java:703)\r\n        at android.graphics.Bitmap.createBitmap(Bitmap.java:670)\r\n        at com.github.amlcurran.showcaseview.ShowcaseView.updateBitmap(ShowcaseView.java:169)\r\n        at com.github.amlcurran.showcaseview.ShowcaseView.onGlobalLayout(ShowcaseView.java:343)\r\n        at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:839)\r\n        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2050)\r\n        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1249)\r\n        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6364)\r\n        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:791)\r\n        at android.view.Choreographer.doCallbacks(Choreographer.java:591)\r\n        at android.view.Choreographer.doFrame(Choreographer.java:561)\r\n        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:777)\r\n        at android.os.Handler.handleCallback(Handler.java:730)\r\n        at android.os.Handler.dispatchMessage(Handler.java:92)\r\n        at android.os.Looper.loop(Looper.java:176)\r\n        at android.app.ActivityThread.main(ActivityThread.java:5419)\r\n        at java.lang.reflect.Method.invokeNative(Native Method)\r\n        at java.lang.reflect.Method.invoke(Method.java:525)\r\n        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)\r\n        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)\r\n        at dalvik.system.NativeStart.main(Native Method)\r\n\r\nI understand the error but what is the cause for it?"}}