TourGuide icon indicating copy to clipboard operation
TourGuide copied to clipboard

calling cleanUp() on an overlay that has disableClick = true

Open tomafc330 opened this issue 10 years ago • 4 comments

Hi there, I seem to be having an issue with dismissing the overlay, this is my init code:

      mTourGuideHandler = TourGuide.init(this).with(TourGuide.Technique.Click)
          .setPointer(new Pointer())
          .setToolTip(null)
          .setOverlay(new Overlay().disableClick(true));

and later on I clean it up:

          mTourGuideHandler.cleanUp(); // end tour

However the overlay does not disappear, is there a reason why?

tomafc330 avatar Sep 23 '15 16:09 tomafc330

Same thing for me. I'm trying to dismiss tutorial on overlay click, but it doesn't work. Exactly the same code as in OverlayCustomisationActivity (just copy-pasted) - no effect.

TheRishka avatar Sep 25 '15 12:09 TheRishka

@TheRishka actually i figured out the issue. Make sure you are not calling it twice or putting the init code inside onResume(). The instance var only holds the last instance of the TourGuide so even when you cancel that instance, the previous instance is still shown.

tomafc330 avatar Sep 25 '15 17:09 tomafc330

I'm trying to understand more about this issue.

@TheRishka Do you mean that when you run OverlayCustomisationActivity directly it works fine, but when you copy and paste it into your app, it doesn't work anymore? If so, there must be some difference, can you help finding out?

@tommytcchan You seem to understand more on this issue, but I still don't quite understand from what you described. Can you explain a bit more on how I can reproduce it? (some code example will be great :D)

worker8 avatar Sep 27 '15 11:09 worker8

@TheRishka yes, there is a huge difference, which i suppose is the main reason. I'm using google maps fragments together with TourGuide. It looks like it intercepts touch events. So i had to create a phantom transparent fragment, bring it in front of gmaps fragment and set onTouchListener on it.

TheRishka avatar Sep 29 '15 09:09 TheRishka