Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgames13 committed Sep 9, 2019
2 parents d606348 + 337cfb2 commit 8170f25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ allprojects {
```
To load the library into your project, use this code in the build.gradle file within the app module:
```gradle
implementation 'com.github.mrgames13:SplashScreen:1.0.3'
implementation 'com.github.mrgames13:SplashScreen:1.0.5'
```

# Usage
To use the SplashScreen, paste this code to the beginning of the `onCreate` method of the launcher activity of your app. For better performance, we recommend to do this before `setContentView()`.
```android
SplashScreenBuilder.getInstance(this)
.setVideo(R.raw.splash_animation)
.setVideoDark(R.raw.splash_animation_dark)
.setImage(R.drawable.app_icon)
.show();
```
Expand All @@ -50,6 +51,7 @@ You can customize the appearance of the SplashScreen using following arguments w
Method | Description
-------|------------
setVideo(int res_id) | Sets the animation video of the SplashScreen. You have to pass this argument, otherwise the app will get an error.
setVideoDark(int res_id) | Set the animation video of the Splash Screen for the dark theme.
setImage(int res_id) | Sets the image of the SplashScreen, which is displayed when the animation has ended. You have to pass this argument, otherwise the app will get an error.
setTextFadeInDuration(int millis) | You can call this method to set the duration of the fade in animation of the title and the subtitle.
setTitle(String title) | This method replaces the name of your app, which is the default title of the SplashScreen, with a custom string.
Expand Down

0 comments on commit 8170f25

Please sign in to comment.