0

I have to implement a Showcase View sequence (important!) on my activity, and this Showcase View seqeunce has to move between the Activity's object (like EditText, TextView, Button, etc..). I didn't found a lot of documentation, and that documentation doesn't satisfy my need, so I'm gonna ask here if someone knows how to do that.

Thank You all!

L. Bedin
  • 5
  • 1
  • 3

1 Answers1

5

Thanks to @ThinkingMonkey for that link. It works for me! A bit late but I hope this could help someone some time.

According to the document of Material Showcase View:

1. Add maven { url "https://jitpack.io" } to project's build.gradle under allproject's repositories.

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

2. Add compile 'com.github.deano2390:MaterialShowcaseView:1.1.0@aar' inside dependencies {...} of module's build.gradle.

3. Declare targets:

        ToggleButton target1 = (ToggleButton) findViewById(R.id.togglebutton);
        TextView target2 = (TextView) findViewById(R.id.text);
        Button target3 = (Button) findViewById(R.id.button);

4. Provide ID if single use.

private static final String SHOWCASE_ID = "1";

5. Here is the sequence code sample of Material Showcase View.

ShowcaseConfig config = new ShowcaseConfig();
config.setDelay(500); // half second between each showcase view

MaterialShowcaseSequence sequence = new MaterialShowcaseSequence(this, SHOWCASE_ID);

sequence.setConfig(config);

sequence.addSequenceItem(target1,
                    "This is button one", "GOT IT");

sequence.addSequenceItem(target2,
                    "This is button two", "GOT IT");

sequence.addSequenceItem(target3,
                    "This is button three", "GOT IT");

sequence.start();

It's all up to you if you want to put it on onclick, menu options or oncreate.

Jei
  • 317
  • 5
  • 15