Giter Site home page Giter Site logo

tourguide's People

Contributors

aaronyfliew avatar akaita avatar aystub avatar christineoo avatar horie1024 avatar jdrider avatar jkreiser avatar mhdante avatar mtrakal avatar ravidsrk avatar svvorf avatar worker8 avatar yutakase6 avatar zeeshanasghar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tourguide's Issues

How to set TextSize of Title or Description?

In my project I don't want to use this "Welcome!" or any other Title on Tooltip. Just a Description. But in that case there is a gap in a place of title. OK, I've tried to set Description as Title, but in that case TextSize is too big=/ How do I completely remove Title, or change it's TextSize?

Can't add the dependency because of ic_launcher1 duplicated

Hi,

Your library seems to be exactly what I'm looking for but I'm not able to add it to my project.

I'm using Gradle 1.3.0. Everything builds until this error :

[...]\build\intermediates\res\merged\sputnikflavor\debug\drawable-xhdpi-v4\ic_launcher1.png: error: Duplicate file.
[...]\build\intermediates\res\merged\sputnikflavor\debug\drawable-xhdpi\ic_launcher1.png: Original is here. The version qualifier may be implied.

Error:Execution failed for task ':[...]'.> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: 
Process 'command '[...]\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1

It seems that there are two folders drawable-xhdpi-v4 and drawable-xhdpi with the same icon ic_launcher1.png

Do you have an idea of what causing the problem?

Thanks

ChainTourGuide missing

In samples you use some: ChainTourGuide but there is no source code or implementation of it.

Same when I use dependencies: com.github.worker8:tourguide:1.0.16-SNAPSHOT@aar

getYForTooTip does not handle CENTER_VERTICAL gravity

I think the getYForTooTip method should look something like this:

private int getYForTooTip(int gravity, int toolTipMeasuredHeight, int targetViewY, float adjustment){
    int y;
    if ((gravity & Gravity.TOP) == Gravity.TOP) {

        if (((gravity & Gravity.LEFT) == Gravity.LEFT) || ((gravity & Gravity.RIGHT) == Gravity.RIGHT)) {
            y =  targetViewY - toolTipMeasuredHeight + (int)adjustment;
        } else {
            y =  targetViewY - toolTipMeasuredHeight - (int)adjustment;
        }
    } else if ((gravity & Gravity.BOTTOM) == Gravity.BOTTOM) {
        if (((gravity & Gravity.LEFT) == Gravity.LEFT) || ((gravity & Gravity.RIGHT) == Gravity.RIGHT)) {
            y =  targetViewY + mHighlightedView.getHeight() - (int) adjustment;
        } else {
            y =  targetViewY + mHighlightedView.getHeight() + (int) adjustment;
        }
    } else { // this is center
        if (((gravity & Gravity.LEFT) == Gravity.LEFT) || ((gravity & Gravity.RIGHT) == Gravity.RIGHT)) {
            y =  targetViewY + mHighlightedView.getHeight() / 2 - (int) adjustment;
        } else {
            y =  targetViewY + mHighlightedView.getHeight() / 2 + (int) adjustment;
        }
    }
    return y;
}

Crash on setting tooltip

Crashes as soon as I start my app and the method play is called, but happens only if I am setting tooltip.
This is what I get always
No static field toolTip_container of type I in class Ltourguide/tourguide/R$id; or its superclasses (declaration of 'tourguide.tourguide.R$id' appears in /data/app

playOn method doesn't work

hi
thank you for your really beautiful library.
I have on serious problem. everything is OK when I call it from onCreate method of Activity, but The TourGuide.playOn() method doesn't work in any view's setOnClickListener method.
aslo, It do nothing when i call "playOn" method from actionBar menu items.
please give some point, if I do something wrong.
thanks in advance

Showing a TourGuide with multiple view focuses

While I can use this library to instantiate multiple TourGuides with Tooltips next to several different views, I can't set more than one Overlay at a time because one covers the other and makes the second unclickable. There are instances where I'd like to have a focus on several different views at a time and I currently can't do that. You would probably need to change the implementation of the Overlay to use a RelativeLayout instead of a FrameLayout, but I think it could be a nice feature. Any plans to add some kind of functionality to achieve this effect in the near future?

Is there a .jar file?

Hi, this library is remarkable, but I am using eclipse now, and I wonder how to use it in eclipse?
Is there a .jar library file?

Thank you.

Cannot fetch dependencies

Hi there,
I'm trying to add this library into my app and for some reason it is not letting me add this.

Here's my app's build.gradle:

`
apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "com.mstar.hotmaps"
    minSdkVersion 16
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.google.android.gms:play-services:7.8.0'
compile ('com.github.worker8.tourguide:1.0.13-SNAPSHOT@aar'){
transitive=true
}
}
`
Is there anything I'm missing?

Thanks.

On touch - listener for dismiss

Hi there, what a remarkable lib)

When the view that's inside playOn() is pressed, the tooltip, pointer and overlay dont' go away.

So, i was wondering is there any other way to touch a tooltip and dismiss it somehow so that perhaps you move to the next step of your tour guide?

ToolTip is flickering for one second because BounceInterpolator is used with AlphaAnimation

The tooltip is flickering in a unpleasant way for one second after being displayed. See video capture here:
https://mega.nz/#!qd8VQL4R!Z7hHVl5J8Oa_EAuynUXBI-HYsMrCJ1AVrbbw2tYJXw0

This occurs on both my test devices (Android 6.0.1 and 4.4.4).

I have identified the root cause:

In ToolTip.java

        mEnterAnimation = new AlphaAnimation(0f, 1f);
        mEnterAnimation.setDuration(1000);
        mEnterAnimation.setFillAfter(true);
        mEnterAnimation.setInterpolator(new BounceInterpolator()); //<<<<<<<<<<

Using a BounceInterpolator with an alpha animation is not appropriate, from a visual experience perspective.

Of course setting my own enterAnimation solves the issue.

I suggest changing the default animation interpolator to something like an AccelerateInterpolator.

disableClick() method doesn't work properly

From documentation:

disableClick(true) will make elements covered by the overlay to become unclickable.

But this option doesn't work with simple example:

        TourGuide.init(getActivity()).with(TourGuide.Technique.Click)
                .setOverlay(new Overlay().disableClick(true))
                .setPointer(new Pointer())
                .setToolTip(new ToolTip().setBackgroundColor(Color.parseColor("#8bc34a"))
                                .setTitle("Title")
                                .setDescription("Description")
                                .setGravity(Gravity.BOTTOM))
                .playOn(mItemView);

mItemView will be still clickable.

OutOfMemoryError

java.lang.OutOfMemoryError: Failed to allocate a 8294412 byte allocation with 16777216 free bytes and 130MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:939)
at android.graphics.Bitmap.createBitmap(Bitmap.java:912)
at android.graphics.Bitmap.createBitmap(Bitmap.java:879)
at tourguide.tourguide.FrameLayoutWithHole.init(FrameLayoutWithHole.java:122)
at tourguide.tourguide.FrameLayoutWithHole.(FrameLayoutWithHole.java:87)
at tourguide.tourguide.TourGuide$1.onGlobalLayout(TourGuide.java:173)
at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:889)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2070)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1191)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6642)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777)
at android.view.Choreographer.doCallbacks(Choreographer.java:590)
at android.view.Choreographer.doFrame(Choreographer.java:560)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

Of course I use android:largeHeap="true" but It doesn`t help.
Samsung s4.

tooltip not pointing to correct view.

Hi,
I am using fragment in my activity. I am trying to create a tutorial for a fragment screen but somehow the the view being highlighted is not the correct one. I am iniating the Tourguide code in onViewCreated function of the fragment. Is it something I am missing considerably.

more customization

i wanted to use this library, however there are a lot of things missing for a regular use case. I give you a short list, if that is okay :)

  • If i enter more than a few words the tooltip expands beyond the screen borders. It shold automatically break the lines if necessary. A simple check if the screen boundaries are reached would be good.
  • The overlay is not alway exactly where i want it, e.g. i have an icon and the overlay is a little bit misplaced around it. so it would be good to be able to "adjust" its position and size through some relative value like "+=3dp" (add 3dp to the size, or move it 3dp to the left)...
  • Chaining of tourguides. Is this planned, how do i do it currently? e.g. i want the user first to click here, then there, and then here.
  • Option to just show the tourGuide without user interaction --> Let it close itself after the user clicked SOMEHWHERE on the Screen.

BTW: Great work nevertheless, really looking forward to this library as the de facto standard for "overlay-helping-tour-guides"

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

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?

Localization (RTL)

I am supporting Arabic for my app and i have a floating action button that moves to the left of the screen. The overlay mirrors fine but the pointer and tooltip dont mirror. The behave as if the button is on the right side of the screen. Please check the screenshot
aml-6m3shoqf_crx-r6rgkurbhafw_c2rmdyj5sdbb8z

Gradle package release date of current code ?

Hi,
I have seen that the current code has Overlay with disableClickThroughHole, but the gradle version doesn't have that code ? so when we can expect that version for availability ?

Replay sequence

Hi,

I have a menuItem for 'help' that starts a sequence with "playInSequence", but i dont know how to replay the sequence, because its beign fired only one time. I need to rebuild the sequence to achieve this?

overlay sequence tour not working in fragment


UPDATED : i move my code to onCreateView. Now it is working. Before this, I called a function of "runTutorial()" from within broadcastreceiver. But no go. Inside OnCreateView, it work.

in my fragment, i have follow this :

https://github.com/worker8/TourGuide/blob/master/app/src/main/java/tourguide/tourguidedemo/OverlaySequenceTourActivity.java

no syntax error, and no logcat error also, but tour is not running.

my project environment :
min sdk : 16
max sdk : 23

using fragment v4 support. But this working fine in activity class

Does not play on Fragment in ViewPager

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.

TourGuide in ListView

hi
about listview , i have listview in my drawer and want to use TourGuide to introduce my drawer (that include listview)

any idea ?

How to use tourguide.next()

My app always crash whenever I using myTour.next(). I define it like this :

TourGuide first_tour = TourGuide.init.....
...
...

first_tour.playOn(view);

TourGuide second_tour = TourGuide.init.....
...
...

second_tour.playLater(view);

and then, when i cleanup the 1st tour, then called second_tour.next(). App crash. Please advise.

Show tooltip for offscreen views

My fragment contains a NestedScrollView and a few buttons are not visible until scrolled down. If I set TourGuide to show their tooltips, I can't see anything but some overlay on the whole screen.

Is there a way to make TourGuide scroll to the view it shows tooltip for?

icon problem and how to add the next button

i loved this tour guide, thx worker8!

sorry the silly question, i know how to add the next button to the layout, but it get "darker", thats because the overlay color to make a "disabled screen" and give lighting to where the pointer is. How can i make the button above/below the tooltip or another position but without getting dark, i tried adding another tourguide just to the button, but it add another "darker" to all the layout making the white pointer a little gray..

or is there another "good" approach for handling the tooltip in sequence and i dont know?

and about the icon problem, when i add the tourguide to the gradle, my manifest get a conflict:

android:icon="myicon"is also present at com.github.worker8:tourguide:1.0.10-SNAPSHOT:13:9 value=(@drawable/ic_launcher1)

i already tried the android:replace icon but without results

not related to the problem, but it was like I was doing:

  1. User open the app for the first time(check the SharedPrefs)
  2. Load a new TourGuide to the first element i want to teach and add the button next in the middle of the screen
  3. for each click on the button call a function called nextTip() and for each click it do a tipCount++; and inside the function nextTip() it check the number and set the actual tour to a new TourGuide... related to the position(after a cleanUp() ofc)

thats the correct approach or there is a kind of actualTour.addTour(new TourGuide...) and some kind of actualTour.displayNextTour();

thx the nice tourGuide ;)

Overlay not cleaning up

When i click in the target button, overlay should close. but its not. Its still showing the overlay on the next screen.

Failed resolution of: Lnet/i2p/android/ext/floatingactionbutton/FloatingActionButton

When I try to put TourGuide in gradle file of my project if I include { transitive=true} It will not build and show:

Error:Execution failed for task ':dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

So I omitted it and after that when I try to use it in a simple example I get this error message:

java.lang.NoClassDefFoundError: Failed resolution of: Lnet/i2p/android/ext/floatingactionbutton/FloatingActionButton;
at tourguide.tourguide.TourGuide.setupAndAddFABToFrameLayout(TourGuide.java:284)
at tourguide.tourguide.TourGuide.access$700(TourGuide.java:26)
.
.
.

Any help?

Is it possible to display TourGuide on AlertDialog

Hi, I am preparing one demo application for I am using this library for guiding.
In my App I also want user to have look at alert dialog So I want tourGuide on Alert Dialog.

Can you help me how do I archive this.?

I am trying the same code but it show behind alert dialog.

Doesn't work with DialogFragments

Any attributes applied to a TourGuide object which is anchored on a View within a DialogFragment show up below the DialogFragment, thus not achieving the desired effect. I think this is because TourGuide elements (Overlay, Tooltip, etc...) are rooted in Activity.getWindow().getDecorView(). I think there should be an option to specify a parent ViewGroup for these elements.

Cannot fetch dependencies

Hi there,
I'm trying to add this library into my app and for some reason it is not letting me add this.

Here's my app's build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "com.mstar.hotmaps"
    minSdkVersion 16
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
   }
   buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
}

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  testCompile 'junit:junit:4.12'
  compile 'com.android.support:appcompat-v7:22.2.1'
  compile 'com.google.android.gms:play-services:7.8.0'
  compile ('com.github.worker8.tourguide:1.0.13-SNAPSHOT@aar'){
      transitive=true
  }
}

Is there anything I'm missing?

Thanks.

UI element is unclickable after the app resumes

If the TourGuide overlay is up and you click back/home/recents button and come back to the app then the TourGuide overlay shows up fine but the highlighted UI element becomes unclickable.

View becomes unresponsive when tourguide sequence is clicked through rapidly

Hi,

I have noticed something which may or may not be a bug. If a person rapidly clicks through the tourguide sequence (without waiting for next animation to appear) then the view becomes unresponsive at the end of the sequence. By unresponsive I mean, no button is clickable in the view. The app doesnt crash however.

Disabling Click events of Views currently highlighted

I use the runOverlay_ContinueMethod() in my project and found that the views that are currently highlighted are actually clickable. I want to temporarily disable all clickable items as long as the tour is running and reenable them after its over. So please either add a feature to setClickable(false) of item under view or provide a method to inquire weather the tour is over or not. I tried to disable clickability of all the Views that I pass to the ".playLater" method of each TourGuide in sequence but I don't know when to enable them again. There is no indication of weather the tour is over or not.

Major memory leak.

The overlay bitmap seems to be leaking. Perhaps from the canvas reference? I'll look into it.

cleanup Sequence

Hello!!!
Thanks your repository,it helps me a lot!!!

I have a problem,
when I show all TourGuide in sequence,how do I cleanup the sequence?
Does it have function like "mTourGuideHandler.cleanUp()" ?

Crash on API 15

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:

11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0xb3131180)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ java.lang.NullPointerException
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2488)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.View.draw(View.java:10981)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.widget.FrameLayout.draw(FrameLayout.java:450)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.View.draw(View.java:10981)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.View.draw(View.java:10981)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.View.draw(View.java:10981)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.widget.FrameLayout.draw(FrameLayout.java:450)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2126)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.ViewRootImpl.draw(ViewRootImpl.java:2026)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1634)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:99)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.os.Looper.loop(Looper.java:137)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:4424)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:511)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
11-07 23:48:42.171    6863-6863/com.MyDomain.MyApp W/FlurryAgent﹕ Error logged: uncaught
11-07 23:48:42.180    6863-6863/com.MyDomain.MyApp E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.NullPointerException
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2488)
            at android.view.View.draw(View.java:10981)
            at android.widget.FrameLayout.draw(FrameLayout.java:450)
            at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
            at android.view.View.draw(View.java:10981)
            at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
            at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
            at android.view.View.draw(View.java:10981)
            at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
            at android.view.View.draw(View.java:10981)
            at android.widget.FrameLayout.draw(FrameLayout.java:450)
            at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2126)
            at android.view.ViewRootImpl.draw(ViewRootImpl.java:2026)
            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)

My code. As far as I can tell from debugging, the last step I reach is mTourGuide.next();

        public TourGuide mTutorialHandler;

        private void initiateTourGuide() {

            initPointer();
            initToolTipAnimations();
            initOverlay();
            initOverlayToPagerFrag();
            buildTourGuideSequenceMainFrag();
            blocking_view.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    mTutorialHandler.getOverlay().performClick();
                }
            });
        }

        private Pointer pointer;

        private void initPointer() {
            pointer = new Pointer().setColor(getResources().getColor(R.color.accent)).setGravity(Gravity.BOTTOM | Gravity.LEFT);
        }

        private Overlay overlay;

        private void initOverlay() {
            overlay = new Overlay().setStyle(Overlay.Style.Rectangle)
                    .disableClick(true)
                    .setEnterAnimation(toolTipEnterAnimation)
                    .setExitAnimation(toolTipExitAnimation)
                    .setBackgroundColor(Color.parseColor("#dd151515"))
                    .setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View view) {
                            try {
                                mTutorialHandler.next();  //*** Last step called in my code ***
                            } catch (Exception ex){
                                ex.printStackTrace();
                            }
                        }
                    })
            ;
        }

        private Overlay overlayToPagerFrag;

        private void initOverlayToPagerFrag() {
            overlayToPagerFrag = new Overlay().setStyle(Overlay.Style.Rectangle)
                    .disableClick(true)
                    .setEnterAnimation(toolTipEnterAnimation)
                    .setExitAnimation(toolTipExitAnimation)
                    .setBackgroundColor(Color.parseColor("#dd151515"))
                    .setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View view) {
                            mTutorialHandler.cleanUp();
                            blocking_view.setVisibility(View.GONE);
                            Fragment frag = getParentFragment();
                            if (frag != null) {
                                if (frag instanceof MainPagerFragment) {
                                    ((MainPagerFragment) frag).initiateTourGuide();
                                }
                            }
                        }
                    })
            ;
        }

        private ToolTip toolTip;


        Animation toolTipEnterAnimation;
        Animation toolTipExitAnimation;

        private void initToolTipAnimations() {
            /* setup enter and exit animation */
            toolTipEnterAnimation = new AlphaAnimation(0f, 1f);
            toolTipEnterAnimation.setDuration(800);
            toolTipEnterAnimation.setFillAfter(true);

            toolTipExitAnimation = new AlphaAnimation(1f, 0f);
            toolTipExitAnimation.setDuration(800);
            toolTipExitAnimation.setFillAfter(true);
        }

        private static final int TOUR_TAP_COURSE_STEP = 15;
        private static final int TOUR_EXPLAIN_ASSIGNMENTS_STEP = 16;
        private static final int TOUR_INDICATE_SCHEDULE_TAB_STEP = 17;

        private ToolTip getToolTip(int tutorialStep) {
            int ori = getResources().getConfiguration().orientation;
            switch (tutorialStep) {
                case TOUR_TAP_COURSE_STEP:
                    toolTip = new ToolTip()
                            .setTextColor(Color.WHITE)
                            .setBackgroundColor(Color.TRANSPARENT)
                            .setShadow(false);


                    if (ori != Configuration.ORIENTATION_LANDSCAPE) {
                        toolTip.setTitle("\n" + getActivity().getString(R.string.tour_tap_course));
                        toolTip.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL);
                    } else {
                        toolTip.setTitle(getActivity().getString(R.string.tour_tap_course));
                        toolTip.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
                    }

                    return toolTip;
                case TOUR_EXPLAIN_ASSIGNMENTS_STEP:
                    toolTip = new ToolTip()
                            .setTextColor(Color.WHITE)
                            .setBackgroundColor(Color.TRANSPARENT)
                            .setShadow(false);

                    if (ori != Configuration.ORIENTATION_LANDSCAPE) {
                        toolTip.setTitle("\n" + getActivity().getString(R.string.tour_approaching_assignments));
                        toolTip.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL);
                    } else {
                        toolTip.setTitle(getActivity().getString(R.string.tour_approaching_assignments));
                        toolTip.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
                    }

                    return toolTip;
                case TOUR_INDICATE_SCHEDULE_TAB_STEP:
                    toolTip = new ToolTip()
                            .setTextColor(getResources().getColor(R.color.primary_dark))
                            .setBackgroundColor(Color.TRANSPARENT)
                            .setShadow(true);

                    if (ori != Configuration.ORIENTATION_LANDSCAPE) {
                        toolTip.setTitle("\n\n" + getActivity().getString(R.string.assignments_and_schedule));
                        toolTip.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL);
                    } else {
                        toolTip.setTitle(getActivity().getString(R.string.assignments_and_schedule));
                        toolTip.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
                    }
                    return toolTip;
                default:
                    return null;
            }
        }

        private void buildTourGuideSequenceMainFrag() {

            TourGuide tourGuide1_tapCourse = TourGuide.init(getActivity())
                    .setPointer(pointer)
                    .setToolTip(getToolTip(TOUR_TAP_COURSE_STEP))
                    .playLater(rootView.findViewById(R.id.course_entire_list_card_view));

            TourGuide tourGuide2_explainAssignments = TourGuide.init(getActivity())
                    .setPointer(pointer)
                    .setToolTip(getToolTip(TOUR_EXPLAIN_ASSIGNMENTS_STEP))
                    .setOverlay(overlayToPagerFrag)
                    .playLater(rootView.findViewById(R.id.assignment_entire_list_card_view));

            Sequence sequence = new Sequence.SequenceBuilder()
                    .add(tourGuide1_tapCourse, tourGuide2_explainAssignments)
                    .setDefaultOverlay(overlay)
                    .setDefaultPointer(null)
                    .setContinueMethod(Sequence.ContinueMethod.OverlayListener)
                    .build();

            blocking_view.setVisibility(View.VISIBLE);
            mTutorialHandler = TourGuide.init(getActivity()).playInSequence(sequence);
        }
    }

NPE crash in TourGuide.cleanUp

After we update TourGuide from com.github.worker8:tourguide:1.0.14-SNAPSHOT@aar to com.github.worker8:tourguide:1.0.16-SNAPSHOT@aar it start crashing in:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void f.a.a.a()' on a null object reference
       at tourguide.tourguide.TourGuide.cleanUp(TourGuide.java:130)
       ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.