Splash Screen With Transition Animation In Android Studio

Splash Screen With Tansition Animation In Android Studio

Splash Screen With Transition Animation In Android Studio.Splash Screens in android are usually used to show the progress before your application loads completely.Some people uses Splash Screen to show their Company Logo for few seconds before app loads.In our this tutorial we are going to make a splash screen with transition animation in android studio.In this project we will show our company logo for few seconds before our application gets loads completely.So lets start..

YouTube Tutorial

Creating New Project (Splash Screen With Transition Animation In Android Studio)

  • Create a new project in Android Studio File–>New–>New Project.
  • Enter Application Name, Package Name, Select Empty Activity and click on finish.

Animation Part

  • Create a Android Resource Directory under res folder (rec–>new–>Android Resource Directory).
  • Name it anim.
  • Under this folder (anim) create a Animation Resource File (anim–>new–>Animation Resource File).
  • Name it mysplashanimation.xml.

splash screen with transition animation in android studio

  • Following are animation code for our splash screen.

Create New Class and Layout

  • Create a new .java (SplashActivity.java) class for Splash Screen in your package and Layout (activity_splash.xml).

Layout Activity (activity_splash.xml)

  • This layout normally contains our app logo or company logo or what ever design we want to show at the beginning of app.
  • You can add your logo in ImageView Source.

SplashActivity.java

  • In this class we have used handler which used to wait for specific time and once the timer is out we launched main activity.
  • Also we are doing animation with screen which is fading in.
  • Code for activity –

AndroidManifest.xml File

  • Open your your AndroidManifest.xml file and make your splash screen activity as Launcher activity.
  • Also change the theme of our SplashActivity.java file to NoActionBar.

Now we will run our app and we will see splash screen for 5 sec with fade in animation then our main activity will be launched.

Download Complete Project

Splash Screen With Transition Animation In Android Studio Complete Project

Subscribe To Our YouTube Channel

 

Like Us On Facebook

 

Other Tutorials-

RECENT POST

1 Comment

  1. This example have two issues, because you create the new Handler() as you do here, you will not have the possibility to cancel it. Not cancel it will introduce two bugs. Fist bug is that if you close the app before the splash screen is finished the app will open itself again. The second bug is that if you rotate the screens you will create additional handlers each starting the MainActivity when it times out.

Leave a Reply

Your email address will not be published. Required fields are marked *