I've implemented a library from github in my app. I want to know how to disable it after its first launch. I dont want it to be shown each time on app launch. heres what i've tried. I tried adding a boolean variable but it didnt work. This question isn't just for this topic, suppose i want to call a method ONLY AFTER FIRST TIME after app install, I dont want it to be called again once its called in first app launch time. i hope it's clear what i'm trying to achieve.
boolean firstLoad;
if(firstLoad=true) {
TapTargetView.showFor(this, // `this` is an Activity
TapTarget.forView(findViewById(R.id.button), "This is a target", "We have the best targets, believe me")
// All options below are optional
.outerCircleColor(R.color.colorPrimary) // Specify a color for the outer circle
.outerCircleAlpha(0.96f) // Specify the alpha amount for the outer circle
.targetCircleColor(R.color.colorAccent2) // Specify a color for the target circle
.titleTextSize(20) // Specify the size (in sp) of the title text
.titleTextColor(R.color.colorAccent2) // Specify the color of the title text
new TapTargetView.Listener() { // The listener can listen for regular clicks, long clicks or cancels
@Override
public void onTargetClick(TapTargetView view) {
super.onTargetClick(view); // This call is optional
}
});
}
firstLoad=false;