<commit_before>![Icon](http://i.imgur.com/biiZxND.png)

# material-intro

[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-material--intro-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/3206)
[![JitPack](https://jitpack.io/v/com.heinrichreimersoftware/material-intro.svg)](https://jitpack.io/#com.heinrichreimersoftware/material-intro)
[![Downloads](https://jitpack.io/v/com.heinrichreimersoftware/material-intro/month.svg)](https://jitpack.io/#com.heinrichreimersoftware/material-intro)
[![Build Status](https://travis-ci.org/heinrichreimer/material-intro.svg?branch=master)](https://travis-ci.org/heinrichreimer/material-intro)
[![License](https://img.shields.io/github/license/heinrichreimer/material-intro.svg)](https://github.com/heinrichreimer/material-intro/blob/master/LICENSE.txt)

A simple material design app intro with cool animations and a fluent API.

_Very inspired by Google's app intros._

### Demo:

A demo app is available on Google Play:

<a href="https://play.google.com/store/apps/details?id=com.heinrichreimersoftware.materialintro.demo">
	<img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" height="60" />
</a>

### Screenshots:

| Simple slide | Custom slide | Fade effect | Permission request |
|:-:|:-:|:-:|:-:|
| ![Simple slide](http://i.imgur.com/cLWW5qm.png) | ![Custom slide](http://i.imgur.com/hmhnzUb.png) | ![Fade effect](http://i.imgur.com/7ujB0S4.png) | ![Permission request](http://i.imgur.com/EDNLGy8.png) |
| [`SimpleSlide.java`](https://github.com/heinrichreimer/material-intro/blob/master/library/src/main/java/com/heinrichreimersoftware/materialintro/slide/SimpleSlide.java) | [`FragmentSlide.java`](https://github.com/heinrichreimer/material-intro/blob/master/library/src/main/java/com/heinrichreimersoftware/materialintro/slide/FragmentSlide.java) | [`IntroActivity.java`](https://github.com/heinrichreimer/material-intro/blob/master/library/src/main/java/com/heinrichreimersoftware/materialintro/app/IntroActivity.java) | [`SimpleSlide.java`](https://github.com/heinrichreimer/material-intro/blob/master/library/src/main/java/com/heinrichreimersoftware/materialintro/slide/SimpleSlide.java) |

### Features:

* Material design ([check the docs](https://material.io/guidelines/growth-communications/onboarding.html#onboarding-top-user-benefits))
* Easy customization
* Predefined slide layouts
* Custom slides
* Autoplay
* Parallax slides
* Fluent API

## Table of Contents

1. [Setup](#setup)
    1. [Gradle Dependency](#gradle-dependency)
    1. [Requirements](#requirements)
1. [Slides](#slides)
    1. [Standard slide](#standard-slide-simpleslide)
    1. [Fragment slide](#fragment-slide-fragmentslide)
    1. [Custom slide](#custom-slide-slide)
1. [Customization](#customization)
    1. [Back button](#left-back-button)
    1. [Next button](#right-next-button)
    1. [CTA button](#cta-button)
    1. [Fullscreen](#fullscreen)
    1. [Scroll duration](#scroll-duration)
1. [Navigation](#navigation)
    1. [Block navigation](#block-navigation)
    1. [Navigate to slides](#navigate-to-slides)
    1. [Autoplay](#autoplay)
    1. [Callbacks](#callbacks)
1. [Tips & Tricks](#tips--tricks)
    1. [Activity result](#activity-result)
    1. [Parallax slides](#parallax-slides)
    1. [Splash screens](#splash-screens)
1. [Apps using this library](#apps-using-this-library)
1. [Changes](#changes)
1. [Open-source libraries](#open-source-libraries)
1. [License](#license)

## Setup:

### Gradle Dependency:

*material-intro* is available on [**jitpack.io**](https://jitpack.io/#com.heinrichreimersoftware/material-intro).

Add this in your root `build.gradle` file (**not** your module `build.gradle` file):
```gradle
allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}
```

Add this in your module `build.gradle` file:
```gradle
dependencies {
    implementation 'com.heinrichreimersoftware:material-intro:1.6.2'
}
```

### Requirements:
The activity must extend [`IntroActivity`](https://github.com/heinrichreimer/material-intro/blob/master/library/src/main/java/com/heinrichreimersoftware/materialintro/app/IntroActivity.java) and have a theme extending `@style/Theme.Intro`:
```java
public class MainIntroActivity extends IntroActivity{
    @Override protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
	// Add slides, edit configuration...
    }
}
```

```xml
<manifest ...>
    <application ...>
        <activity android:name=".MainIntroActivity"
            android:theme="@style/Theme.Intro"/>
    </application>
</manifest>
```

_(Unless mentioned otherwise all of the following method calls should go in the activity's `onCreate()`.)_

## Slides:

_material-intro_ has fluent style builders for both a simple text/image slide, as seen in Google's apps, and for slides featuring a custom `Fragment` or layout resource.<commit_msg>Prepare for a new release; remove hard-coded version number from README.<commit_after>![Icon](http://i.imgur.com/biiZxND.png)

# material-intro

[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-material--intro-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/3206)
[![JitPack](https://jitpack.io/v/com.heinrichreimersoftware/material-intro.svg)](https://jitpack.io/#com.heinrichreimersoftware/material-intro)
[![Downloads](https://jitpack.io/v/com.heinrichreimersoftware/material-intro/month.svg)](https://jitpack.io/#com.heinrichreimersoftware/material-intro)
[![Build Status](https://travis-ci.org/heinrichreimer/material-intro.svg?branch=master)](https://travis-ci.org/heinrichreimer/material-intro)
[![License](https://img.shields.io/github/license/heinrichreimer/material-intro.svg)](https://github.com/heinrichreimer/material-intro/blob/master/LICENSE.txt)

A simple material design app intro with cool animations and a fluent API.

_Very inspired by Google's app intros._

### Demo:

A demo app is available on Google Play:

<a href="https://play.google.com/store/apps/details?id=com.heinrichreimersoftware.materialintro.demo">
	<img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" height="60" />
</a>

### Screenshots:

| Simple slide | Custom slide | Fade effect | Permission request |
|:-:|:-:|:-:|:-:|
| ![Simple slide](http://i.imgur.com/cLWW5qm.png) | ![Custom slide](http://i.imgur.com/hmhnzUb.png) | ![Fade effect](http://i.imgur.com/7ujB0S4.png) | ![Permission request](http://i.imgur.com/EDNLGy8.png) |
| [`SimpleSlide.java`](https://github.com/heinrichreimer/material-intro/blob/master/library/src/main/java/com/heinrichreimersoftware/materialintro/slide/SimpleSlide.java) | [`FragmentSlide.java`](https://github.com/heinrichreimer/material-intro/blob/master/library/src/main/java/com/heinrichreimersoftware/materialintro/slide/FragmentSlide.java) | [`IntroActivity.java`](https://github.com/heinrichreimer/material-intro/blob/master/library/src/main/java/com/heinrichreimersoftware/materialintro/app/IntroActivity.java) | [`SimpleSlide.java`](https://github.com/heinrichreimer/material-intro/blob/master/library/src/main/java/com/heinrichreimersoftware/materialintro/slide/SimpleSlide.java) |

### Features:

* Material design ([check the docs](https://material.io/guidelines/growth-communications/onboarding.html#onboarding-top-user-benefits))
* Easy customization
* Predefined slide layouts
* Custom slides
* Autoplay
* Parallax slides
* Fluent API

## Table of Contents

1. [Setup](#setup)
    1. [Gradle Dependency](#gradle-dependency)
    1. [Requirements](#requirements)
1. [Slides](#slides)
    1. [Standard slide](#standard-slide-simpleslide)
    1. [Fragment slide](#fragment-slide-fragmentslide)
    1. [Custom slide](#custom-slide-slide)
1. [Customization](#customization)
    1. [Back button](#left-back-button)
    1. [Next button](#right-next-button)
    1. [CTA button](#cta-button)
    1. [Fullscreen](#fullscreen)
    1. [Scroll duration](#scroll-duration)
1. [Navigation](#navigation)
    1. [Block navigation](#block-navigation)
    1. [Navigate to slides](#navigate-to-slides)
    1. [Autoplay](#autoplay)
    1. [Callbacks](#callbacks)
1. [Tips & Tricks](#tips--tricks)
    1. [Activity result](#activity-result)
    1. [Parallax slides](#parallax-slides)
    1. [Splash screens](#splash-screens)
1. [Apps using this library](#apps-using-this-library)
1. [Changes](#changes)
1. [Open-source libraries](#open-source-libraries)
1. [License](#license)

## Setup:

### Gradle Dependency:

*material-intro* is available on [**jitpack.io**](https://jitpack.io/#com.heinrichreimersoftware/material-intro).

Add this in your root `build.gradle` file (**not** your module `build.gradle` file):
```gradle
allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}
```

Add this in your module `build.gradle` file: 

![](https://jitpack.io/v/com.heinrichreimersoftware/material-intro.svg)

```gradle
dependencies {
    implementation 'com.heinrichreimersoftware:material-intro:x.y.z'
}
```

### Requirements:
The activity must extend [`IntroActivity`](https://github.com/heinrichreimer/material-intro/blob/master/library/src/main/java/com/heinrichreimersoftware/materialintro/app/IntroActivity.java) and have a theme extending `@style/Theme.Intro`:
```java
public class MainIntroActivity extends IntroActivity{
    @Override protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
	// Add slides, edit configuration...
    }
}
```

```xml
<manifest ...>
    <application ...>
        <activity android:name=".MainIntroActivity"
            android:theme="@style/Theme.Intro"/>
    </application>
</manifest>
```

_(Unless mentioned otherwise all of the following method calls should go in the activity's `onCreate()`.)_

## Slides:

_material-intro_ has fluent style builders for both a simple text/image slide, as seen in Google's apps, and for slides featuring a custom `Fragment` or layout resource.
{'fraction_non_alphanumeric': 0.1645771144278607, 'fraction_numerical': 0.008258706467661692, 'mean_word_length': 4.940307328605201, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 39, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2692064', 'n_tokens_mistral': 3579, 'n_tokens_neox': 3341, 'n_words': 562}