Splash Screen with Animation in Android

Splash screen with Animation in Android

Splash Screen is the first screen of an app. The splash screen is used to display some basic information about the app, like the brand logo, name, slogan, etc. It’s like an introduction to the app.

So, now you are going to create a splash screen, it includes a logo, name, and slogan.

  • Before going to start, copy your logo or image, and paste it in the res/drawable directory.
Paste the image in drawable directory
Paste the image in drawable directory
Paste the image in drawable directory
  • In the splash screen, you don’t need Action Bar. So go to the res/values/style.xml file and change the DarkActionBar theme to the NoActionBar theme.
Change DarkActionBar to NoActionBar
Change DarkActionBar to NoActionBar
Change DarkActionBar to NoActionBar
  • Now open the activity_splash.xml file. In Android Tutorial, Layout in Android blog, we have already discussed how to write XML and what is the need for XML. CLICK HERE to know more.

Create activity_splash.xml file:

activity_splash.xml

Create Animation File:

  • You are going to use three animations. Top, Bottom, and Middle Animations.
  • To add animation files, first create the anim directory inside the res folder.
Create anim directory
Create anim directory
Create anim directory
  • Create three Drawable Resource File inside anim directory. Right click on anim > New > Drawable Resource File, like this create three files.

top_animation:

Top-animation
Top-animation
Top-animation

bottom_animation:

Bottom-animation
Bottom-animation
Bottom-animation

middle_animation:

middle_animation
middle_animation
middle_animation

Thank you!

Hi everyone, myself Golap an Android app developer with UI/UX designer.