Hi All,
Get Stuck in add Welcome screen to your Android application?Here I am going to show You How to create easy splash screen to your android app.
for that we simply need
A.IDE-Android Studio latest version with SDK.
B.Android Emulator or android Device.
Step By procedure to create splash screen
1.Start Android Studio IDE
2.Start New PROJECT name as Easy Splash screen
3.Choose an empty activity with name Main Activity
4.After Loading the project go to res-value-style and change the theme in to
style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"
5.Add a new activity name as Splashscreen.
6.Remove default marginof splashscreen.xml file.
7.Add image view to splashscreen.xml file.
8.How to add image in project? for that see my blog
8.Add source for image in spashscreen.xml file.
android:src="@drawable/android_boot_image"
9.Initialize image view in splashscreen.java by
imageView= (ImageView) findViewById(R.id.imageView);
10.Create new directory in res directory name as anim and create new animation source file in anim directory.
11.Set a duration for splashscreen
android:duration="4000"
12.Create Object of Animation class in splash screen
Animation animation= AnimationUtils.loadAnimation(getApplicationContext(), R.anim.animation);
13.Create set animation listener to animation object.
14.Start MainActivity in onAnimationEnd using intent object.
15.Run app using Android adb manager by clicking Run Button
End
No comments:
Post a Comment