Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Watch it on [YouTube](https://www.youtube.com/watch?v=4vUe8xVAEIM).
## How do I use IntroActivity?
Simple. Just create an `Activity` and extend `IntroActivity.`

By extending `IntroActivity`, you'll automatically implement the `initialize()` method. This is where you set up your intro screens and any custom styling. It is not possible to override `onCreate()` as this is used by the library to set up your intro screen.
By extending `IntroActivity`, you'll automatically implement the `initialize()` method. This is where you set up your intro screens and any custom styling.
If you need to override `onCreate()`, be sure to call `super.onCreate()`, as the library relies on it.

Here's an example of how to extend `IntroActivity` and add a basic intro screen:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.animation.ArgbEvaluator;
import android.graphics.PorterDuff;
import android.os.Bundle;
import android.support.annotation.CallSuper;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
Expand All @@ -28,7 +29,8 @@ public abstract class IntroActivity extends AppCompatActivity {
private int mProgressCircleColor;

@Override
protected final void onCreate(Bundle savedInstanceState) {
@CallSuper
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setTheme(R.style.IntroActivity_Theme);
Expand Down