SplashScreenHelper

SplashScreenHelper is a lightweight, easy-to-use android library that will help you add a splash screen to your app. In a few easy steps, you can add your logo and some text and animate it. Or perhaps you want to add a video. SplashScreenHelper can do that also.

I got the idea for it when I couldn’t find a similar library with the functionality and customization option that I needed. All you have to do is to implement it and give it some images, text or video.

Implementation

Gradle

implementation 'com.kovacivan:SplashScreenHelper:1.3'

Links

Usage

Image and text underneath it:

SplashScreenHelper(this)
    .logoResource(R.drawable.your_logo)
    .setText("Some text here")
    .start()

If you want to add sub text underneath added text:

SplashScreenHelper(this)
    .logoResource(R.drawable.your_logo)
    .setText("Some text here")
    .setSubText("Some other text")
    .start()

If you want to add an image instead of text:

SplashScreenHelper(this)
    .logoResource(R.drawable.your_logo)
    .bottomImageResource(R.drawable.some_image)
    .start()

You can set the video as a splash screen

SplashScreenHelper(this)
    .videoResource(R.raw.some_video)
    .start()

All options

OptionDescription
showLogo(boolean)Show or hide the logo
logoResource(Int)Add your logo resource
logoDimensions(width, height)Change the size of your logo
logoSpin(boolean)Make your logo spin
showText(boolean)Show or hide text under the logo
setText(String)Add your text
textColor(Int)Change text color (eg. Color.RED)
textColorHex(String)Change text color in HEX format (eg. “#FF0000)
textTypeface(Int)Change text Typeface (eg. Typeface.BOLD)
textSize(Int)Change text size
showSubText(boolean)Show sub text under text
setSubText(String)Set sub text
subTextColor(Int)Change sub text color (eg. Color.RED)
subTextColorHex(String)Change sub text color in HEX format (eg. “#FF0000)
subTextTypeface(Int)Change sub text Typeface (eg. Typeface.BOLD)
subTextSize(Int)Change sub text size
showBottomImage(boolean)Show or hide image instead of text and sub text
bottomImageResource(Int)Add your bottom image resource
bottomImageHeight(Int)Change the height of the bottom image
backgroundColor(Int)Add background color to the whole splash screen (eg. Color.RED)
backgroundColorHex(String)Add background color to the whole splash screen in HEX format (eg. “#FF0000)
setBackgroundImageResource(Int)Add an image as background to the whole splash screen
dividerHeight(Int)Change space height between logo and text
textDividerHeight(Int)Change space height between text and sub text
showProgressBar(boolean)Show or hide the progress bar
progressBarType(Int)Choose progress bar type (eg. ProgressBarType.HORIZONTA)
progressBarPosition(Int)Change the position of the progress bar (eg. ProgressBarPosition.INSTEAD_OF_TEXT)
progressBarColor(Int)Change progress bar color (eg. Color.RED)
progressBarColorHex(String)Change progress bar color in HEX format (eg. “#FF0000)
delay(Long)Set the delay before animation start in milliseconds
duration(Long)Set the duration of the animation in milliseconds
pause(Long)Set pause after animation in milliseconds
animationType(AnimationType)Choose an animation type (eg.AnimationType.FLY_IN)
finishOnClick(boolean)End splash screen on click
showVideo(boolean)Show or hide video instead of logo, text and sub text
videoResource(Int)Add your video resource
fitVideoToScreen(boolean)Changes scale of video to fit in the screen
loopVideo(boolean)Loops video indefinitely
fullscreen(boolean)Show splash screen in fullscreen
start()Starts splash screen

ProgressBarType

TypeDescription
CIRCULARRound progress bar
HORIZONTALLinear progress bar

ProgressBarPosition

PositionDescription
TOPTop of the screen
BOTTOMBottom of the screen
UNDER_TEXTUnderneath the text
INSTEAD_OF_TEXTHides text and sub text and show progress bar

AnimationType

PositionDescription
FLY_INLogo flies in from the top and text and sub text flies in from the bottom
FLY_OUTLogo flies out to the top and text and sub text flies out to the bottom
FADE_INFades in
FADE_OUTFades out

If you have some ideas about what should I add or change, or maybe you have some issues with this library, please let me know. I will be happy to hear your feedback.