FABProgressCircle icon indicating copy to clipboard operation
FABProgressCircle copied to clipboard

java.lang.NullPointerException

Open Mygod opened this issue 9 years ago • 4 comments

at com.github.jorgecastilloprz.FABProgressCircle.hide(FABProgressCircle.java:166)

Mygod avatar Jan 02 '16 16:01 Mygod

I face this problem Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.github.jorgecastilloprz.progressarc.ProgressArcView.requestCompleteAnimation()' on a null object reference

mrThinBone avatar Feb 27 '16 02:02 mrThinBone

+1 NPE on Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'void com.github.jorgecastilloprz.progressarc.ProgressArcView.stop()' on a null object reference

amjedab avatar Aug 29 '16 15:08 amjedab

As @helloray 's comment on https://github.com/JorgeCastilloPrz/FABProgressCircle/issues/29 shows:

After checking the library source code, addArcView() is called by onMeasure() method. As a result of that, you should not use the show function until the activity is completely shown. A good place to call show() is in onWindowFocusChanged(hasFocus == true) function .

@override public void onWindowFocusChanged(boolean hasFocus) {

if (hasFocus == true) fabProgressCircle.show(); }

You should not use the show() function in OnCreate, OnResume, OnStart.

Abushawish avatar Jun 28 '17 08:06 Abushawish

@JorgeCastilloPrz this causes us quite some trouble, do you plan to publish an update of you wonderful library some time? - It would be really great and I think it would be worth it if we see the number of stars here on the repo...

ramack avatar Oct 28 '19 20:10 ramack