Git Product home page Git Product logo

wizardbuilder's Introduction

WizardBuilder

Provides a simple interface to a customizeable wizard as seen in App Quarantine.

Here are some use cases:

  • Introduction screen when app is launched for the first time
  • Show off new features when app is updated
  • Provide tutorial screens for certain features

Screenshot

There is a new option to launch the wizard in an unintrusive way from the action bar. A colored 'news' icon is shown to launch the wizard. Once the user has read it (e.g. used one of the two wizard buttons) then the icon disappears. It will reappear again if you push some new content (increase the whatsNewId).

Screenshot

Dependencies

In order to use WizardBuilder you need to add the following libraries:

Usage

In your project you first create the wizard:

WizardPage firstPage = new WizardPage.Builder()
        .setImageId(R.drawable.robot)
        .setDescriptionId(R.string.robot)
        .build();

WizardPage secondPage = new WizardPage.Builder()
        .setImageId(R.drawable.alien)
        .setDescriptionId(R.string.alien)
        .setButtonTextId(R.string.dosomething)
        .build();

WizardBuilder wizard = new WizardBuilder.Builder(this, "Test")
        .setWhatsNewId(42)
        .addPage(firstPage)
        .addPage(secondPage)
        .setListener(new Listener())
        .build();

You can now launch it directly:

wizard.show();

If you want to launch it from the ActionBar instead then you need to inherit your activity from 'WizardLauncherActivity' and add an icon to your ActionBar menu. Then add this line (typically from onCreate of your activity):

addWizardLauncher(R.id.news, createWizard());

Finally in the listener you can do some action when the user has clicked a button in a wizard page:

class Listener implements WizardBuilder.WizardListener {

    @Override
    public void onClickedButton(int page) {
        Toast.makeText(MyActivity.this, "Do something on page " + page, Toast.LENGTH_SHORT).show();
    }

    @Override
    public void onClickedDismissButton() {
        Toast.makeText(MyActivity.this, "Dismissed", Toast.LENGTH_SHORT).show();
    }
}

License

WizardBuilder is licensed under the Apache License. Feel free to use it in your free or paid Android apps. Please add a little note in your license info screen that you are using WizardBuilder and if possible include a link to this Github page. Vice versa you can send me a message so I can mention your app here as well.

wizardbuilder's People

Contributors

yongjhih avatar

Watchers

 avatar James Cloos avatar  avatar

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.