We are using this library to show a tooltip inside a dialog fragment but with crashs with a NPE when we try to show the balloon:
java.lang.NullPointerException
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:465)
at android.view.View.measure(View.java:15172)
at com.skydoves.balloon.Balloon$showAlignTop$$inlined$show$1.run(Balloon.kt:267)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Hi, @luizfp thank you for your issue :)
But unfortunately, the minimum API level is changed 16 to 17 in the latest release because of the bug of the Android SDK when inflating and measuring RelativeLayout in API level 16.
You can check out the details here. Thank you!
Please complete the following information:
Describe the Bug:
We are using this library to show a tooltip inside a dialog fragment but with crashs with a NPE when we try to show the balloon:
Code we use to build the Balloon:
Custom layout:
And to show:
mBalloon.showAlignTop(view);
We also test on API 26 and it works fine.