AppIntro
AppIntro is an Android Library that helps you make a cool intro for your app, like the ones in Google apps.
Usage
Basic usage
- Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
- Add the dependency
Please note that AppIntro supports Android X. If you haven't migrated yet, you probably want to use
a previous version of the library that uses the old Support Library packages (or try Jetifier Reverse mode).
Create a new Activity that extends AppIntro:
Note above that we DID NOT use setContentView();
Finally, declare the activity in your Manifest like so:
Do not declare the intro as your main app launcher unless you want the intro to launch every time your app starts.
Refer to the wiki for an example of how to launch the intro once from your main activity.
Alternative layout
If you want to try an alternative layout (as seen in Google's Photo app), just extend AppIntro2 in your Activity. That's all :)
Slides
Basic slides
AppIntro provides two simple classes, AppIntroFragment
and AppIntro2Fragment
which one can use to build simple slides.
Custom slides example
One may also define custom slides as seen in the example project:
- Copy the class SampleSlide from my example project.
- Add a new slide with
addSlide(SampleSlide.newInstance(R.layout.your_slide_here));
There's no need to create one class for fragment anymore. :)
Extended usage
Animations
AppIntro comes with some pager animations.
Choose the one you like and then activate it with:
Available animations:
If you want to create nice parallax effect or your own custom animation, create your own PageTransformer and call:
Click here to see how I did it in the example app.
Background color transitions
AppIntro supports background color transitions:

In order to setup the transitions, simply implement ISlideBackgroundColorHolder
:
The API is quite low-level, therefore highly customizable. The interface contains two methods:
getDefaultBackgroundColor
: Return the default background color (i.e. the background color the slide has in non-sliding state) of the slide here.setBackgroundColor(int)
: This method will be called while swiping between two slides. Update the background color of the view to which the transition should be applied.
This is normally the root view of your Fragment's layout. But one may also apply the color transition to some other view only (i.e. a Button).
Runtime Permissions (Android 6.0+)

Android 6.0 introduced a new permissions model for developers. Now all your apps have to request permissions which can be a tedious thing to implement.
However, AppIntro simplifies this down to one single line of code!
NOTE: It is advised that you only put one permission in the String array unless you want the app to ask for multiple permissions on the same slide.
NOTE 2: Requesting permissions automatically disables sliding, and users will have to result to pressing the buttons. Please do not open any issues regarding this, as they will be immmediately closed. Thanks!
Slide Policies
If you want to restrict navigation between your slides (i.e. the user has to toggle a checkbox in order to continue), our Slide Policy feature might help you.
All you have to do is implement ISlidePolicy
in your slides:
The interface contains two methods:
isPolicyRespected
: The return value of this method defines if the user can leave this slide, i.e. navigate to another oneonUserIllegallyRequestedNextPage
: This method gets called if the user tries to leave the slide althoughisPolicyRespected
returned false. One may show some error message here.
Translating
Do you want to help AppIntro becoming international ?? We are more than happy!
AppIntro currently supports the following languages.
To add a new translation just add a pull request with a new strings.xml
file inside a values-xx
folder (where xx
is a two-letter ISO 639-1 language code).
In order to provide the translation, your file needs to contain the following strings:
An updated version of the english version translation is available here.
Example App
See example code here on GitHub. You can also see it live by downloading our example on Google Play.
Real life examples
Do you need inspiration? A lot of apps are using AppIntro out there:
Planets

Hermes - Material IRC Client