Git Product home page Git Product logo

appintro's Introduction

Android Gems

Maven Central Android Arsenal
Get it on Google Play

AppIntro

Android Library to make a cool intro for your app.

Watch YouTube video here.

##How to use Add this to your build.gradle:

repositories {
    mavenCentral()
}

dependencies {
  compile 'com.github.paolorotolo:appintro:2.0.0'
}

Create a new Activity that extends AppIntro:

public class MyIntro extends AppIntro {

    // Please DO NOT override onCreate. Use init
    @Override
    public void init(Bundle savedInstanceState) {

        // Add your slide's fragments here
        // AppIntro will automatically generate the dots indicator and buttons.
        addSlide(new FirstSlide(), getApplicationContext());
        addSlide(new SecondSlide(), getApplicationContext());
        addSlide(new ThirdSlide(), getApplicationContext());
        addSlide(new FourthSlide(), getApplicationContext());

        // OPTIONAL METHODS
        // Override bar/separator color
        setBarColor(Color.parseColor("#3F51B5"));
        setSeparatorColor(Color.parseColor("#2196F3"));

        // Hide Skip button
        showSkipButton(false);

        // Turn vibration on and set intensity
        // NOTE: you will probably need to ask VIBRATE permesssion in Manifest
        setVibrate(true);
        setVibrateIntensity(30);
    }

    @Override
    public void onSkipPressed() {
    // Do something when users tap on Skip button.
    }

    @Override
    public void onDonePressed() {
    // Do something when users tap on Done button.
    }
}

Please, DO NOT override onCreate. Just use init instead

Layout 2

If you want to try new layout (as seen in Google's Photo app), just extend AppIntro2 in your Activity. That's all :)

public class MyIntro extends AppIntro2 {
    [...]
}

Animations

AppIntro comes with a Fade animation, that you can activate with:

// Put this method in init()
setFadeAnimation();

If you want to create nice parallax effect or your custom animation, create your own PageTransformer and call:

// Put this method in init()
setCustomTransformer(transformer);

Click here to see how I did it in the example app.

Example

See example code here on Github. You can also see it live downloading this app from Google Play.

Apps using it

If you are using AppIntro in your app and would like to be listed here, please let me know via email!

Real life examples

Do you need inspiration? A lot of apps are using AppIntro out there:

Planets

Hermes - Material IRC Client

appintro's People

Contributors

liaohuqiu avatar llin233 avatar macroyau avatar mhzdev avatar paolorotolo avatar sleepingant avatar

Watchers

 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.