Coder Social home page Coder Social logo

wpxiaoxue / tutorialview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from avinashkolluru/tutorialview

0.0 2.0 0.0 1.76 MB

Highlight the new features/best parts of your Android App and guide new users

License: Apache License 2.0

Java 100.00%

tutorialview's Introduction

TutorialView

Highlight the new features or best parts of your Android App and guide new users

ย 

Contains 3 modules

  1. TutorialViewLibrary (com.ak.android.tutorialview) which is an Android Library
  2. TutorialViewSampleApp - A sample app showing how to use the above library
  3. viewpagerindicator(http://viewpagerindicator.com/) - Used by the library for viewing tutorial with multiple items/pages

TutorialBuilder

Build your tutorial using the TutorialBuilder class by passing one or more tutorial items. Sample code below:

private void showTutorial(){
        TutorialBuilder builder = new TutorialBuilder(this);

        ViewHighlighterCustomViewTutorialItem tutItem1 = new ViewHighlighterCustomViewTutorialItem(
                this,
                R.id.button1,
                R.layout.tutorial_custom_layout
        );
        ViewHighlighterTutorialItem tutItem2 = new ViewHighlighterTutorialItem(
                this,
                R.string.tut_page2_desc,
                R.id.button2, R.id.button3
        );
        builder.setTutId(1)
                .setForce(true)
                .addTutItem(tutItem1)
                .addTutItem(tutItem2)
                .build()
                .run();
    }

Each tutorial needs a unique Id - set via setTutId(int)

By default the tutorial is shown only once on the first run unless it is forced using setForce(boolean)

TutorialItem

Currently there is support for 2 types of tutorial items

  1. ViewHighlighterTutorialItem - A simple help text overlay highlighting required views and a central aligned text describing the highlighted view
ViewHighlighterTutorialItem tutItem2 = new ViewHighlighterTutorialItem(
                this, //activity object
                R.string.tut_page2_desc, // string resource id describing the highlighed view
                R.id.button2, R.id.button3 // view resource ids of views to be highlighted
        );
  1. ViewHighlighterCustomViewTutorialItem - A custom layout help overlay over highlighted views
ViewHighlighterCustomViewTutorialItem tutItem1 = new ViewHighlighterCustomViewTutorialItem(
                this, //activity object
                R.id.button1, // view resource id to highlight
                R.layout.tutorial_custom_layout // layout resource id to be shown as help over highlighted view
        );

tutorialview's People

Contributors

avinashkolluru avatar

Watchers

James Cloos avatar sherylchang 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.