Open NSouth opened 8 years ago
Same here, everything works fine on Lollipop but crashes on ICS.
/* setup enter and exit animation */
AlphaAnimation mEnterAnimation = new AlphaAnimation(0f, 1f);
mEnterAnimation.setDuration(600);
mEnterAnimation.setFillAfter(true);
AlphaAnimation mExitAnimation = new AlphaAnimation(1f, 0f);
mExitAnimation.setDuration(600);
mExitAnimation.setFillAfter(true);
// the return handler is used to manipulate the cleanup of all the tutorial elements
TourGuide tourGuide1 = TourGuide.init(this)
.setToolTip(new ToolTip()
.setTitle(getString(R.string.tutorial1_title))
.setDescription(getString(R.string.tutorial1))
.setGravity(Gravity.CENTER)
)
// note that there is not Overlay here, so the default one will be used
.playLater(screenCenter);
TourGuide tourGuide2 = TourGuide.init(this)
.setToolTip(new ToolTip()
.setTitle(getString(R.string.tutorial2_title))
.setDescription(getString(R.string.tutorial2))
.setGravity(Gravity.BOTTOM)
.setBackgroundColor(Color.parseColor("#c0392b"))
)
.playLater(noticeContainer);
TourGuide tourGuide3 = TourGuide.init(this)
.setToolTip(new ToolTip()
.setDescription(getString(R.string.tutorial3))
.setGravity(Gravity.BOTTOM)
)
// note that there is not Overlay here, so the default one will be used
.playLater(noticeContainer);
Sequence sequence = new Sequence.SequenceBuilder()
.add(tourGuide1, tourGuide2, tourGuide3)
.setDefaultOverlay(new Overlay()
.setEnterAnimation(mEnterAnimation)
.setExitAnimation(mExitAnimation).setBackgroundColor(Color.parseColor("#8800796B")).setStyle(Overlay.Style.Rectangle)
)
.setDefaultPointer(null)
.setContinueMethod(Sequence.ContinueMethod.Overlay)
.build();
TourGuide.init(this).playInSequence(sequence);
Still not fixed on ICS (API 15) any updates?
06-04 10:32:03.574 6158-6158/xx.xxxx.xxxx.xxxx E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2488)
at android.view.View.draw(View.java:10986)
at android.widget.FrameLayout.draw(FrameLayout.java:450)
at android.view.View.getDisplayList(View.java:10422)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
at android.view.View.getDisplayList(View.java:10385)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.draw(View.java:10986)
at android.widget.FrameLayout.draw(FrameLayout.java:450)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2126)
at android.view.View.getDisplayList(View.java:10422)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:849)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:1910)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1634)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
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:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
I had the same problem, and I found that it's caused by the Overlay exit animation. Don't set any exit animation for Android API 15, and it's fixed!
My app is crashing for devices on API 15 (4.0.3) when
mTutorialHandler.next()
is called in my TourGuide sequence. I would appreciate any insight as to why this might be happening. This code is now in production, so I would really like to figure it out!Logcat output:
My code. As far as I can tell from debugging, the last step I reach is mTourGuide.next();