worker8 / TourGuide

TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View
MIT License
2.63k stars 416 forks source link

disableClick() not working with Sequence.ContinueMethod.OverlayListener #83

Open azrashaikh opened 8 years ago

azrashaikh commented 8 years ago

I want to disable my control's click when it's highlighted.

My code :

ChainTourGuide.init(activity)
                .setToolTip(new ToolTip()
                        .setBackgroundColor(activity.getResources().getColor(R.color.color_help_text_background))
                        .setDescription(message)
                        .setGravity(gravity)
                ).setOverlay(new Overlay()
                        .disableClick(true)
                        .setEnterAnimation(getEnterAnimation())
                        .setExitAnimation(getExitAnimation())
                        .setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                if (callback != null) {
                                    callback.next();
                                    if (isLastTour)
                                        callback.helpCompleted();
                                }
                            }
                        })
                );
new Sequence.SequenceBuilder()
                .add(tour)
                .setDefaultOverlay(new Overlay()
                        .disableClick(true)
                        .setEnterAnimation(getEnterAnimation())
                        .setExitAnimation(getExitAnimation())
                )
                .setDefaultPointer(null)
                .setContinueMethod(Sequence.ContinueMethod.OverlayListener)
                .build();

I am still getting click event of my highlighted control.

vyndor commented 8 years ago

You should use disableClickThroughHole

azrashaikh commented 8 years ago

Yes, worked. thanks :+1: