TourGuide icon indicating copy to clipboard operation
TourGuide copied to clipboard

Does not play on Fragment in ViewPager

Open NSouth opened this issue 9 years ago • 0 comments

I apologize if I am missing something obvious. My Main activity hosts a Fragment which in turn hosts a ViewPager containing two fragments. I am trying to use TourGuide on a view in one of the ViewPager's fragments and it does not work. There are no exceptions, but no Tour is shown.

This is the code I'm running from The fragment which hosts the ViewPager:

View v = curFragmentMain.rootView;
        View card = v.findViewById(R.id.course_entire_list_card_view);

        TourGuide mTourGuideHandler = TourGuide.init(getActivity()).with(TourGuide.Technique.Click)
                .setPointer(new Pointer())
                .setToolTip(new ToolTip().setTitle("My's Tip!").setDescription("Look, you really want to click this"))
                .setOverlay(new Overlay())
                .playOn(card);

Edit: I should note that this does work on views from the fragment hosting the ViewPager. I can play the Tour on mainTab = ((ViewGroup) tabLayout.getChildAt(0)).getChildAt(0);

Edit 2: It also appears to work when the Tour is run from from one of the fragments in the ViewPager. Therefore, it seems that the issue is with TourGuide playing on views in fragments which are not the current fragment. I'm not sure if that is expected or not. I may have to implement some custom logic between the fragments using ContinueMethod.OverlayListener in order to get my desired output.

NSouth avatar Oct 21 '15 00:10 NSouth