Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

error boolean android.view.View.getGlobalVisibleRect #67

Open
fabrizziocht opened this issue Jan 9, 2019 · 2 comments
Open

error boolean android.view.View.getGlobalVisibleRect #67

fabrizziocht opened this issue Jan 9, 2019 · 2 comments

Comments

@fabrizziocht
Copy link

I'm using version 1.2.1,
so after run application appears its error:
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.webcontrol.earlyalert, PID: 17720 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.view.View.getGlobalVisibleRect(android.graphics.Rect, android.graphics.Point)' on a null object reference at com.github.florent37.viewtooltip.ViewTooltip$3.run(ViewTooltip.java:177) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6940) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
with previous version runs, but the tooltip not match with the layout on right or left side #64

@fabrizziocht
Copy link
Author

I must pass a root view in method ".on":

ViewTooltip .on(this, base_main, btn_sync) .autoHide(true, 3000) .corner(30) .position(ViewTooltip.Position.LEFT) .text("TEST") .show()
the position works well, but after fade out appears again for a second.

@sanedev
Copy link

sanedev commented Jan 10, 2019

Fixed Bug, and a Create PullRequest just now, Thanks.
Changes:
References a rootView directly -> References a decorView.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants