Android Splash Screen Animated UI Design Example

Hii in this article I am sharing in Android how to create an Android Splash Screen  UI Design Example. It’s very easy to implement in android splash Screen you used to create a drawable XML file in res for animation. if you want to use animation in your android app splash screen just follow simple step and create it.

Android Splash Screen Animated UI Design Example

Step 1: Create A bounce.XML file in your res==>anim==>bounce.XML

in res, you can create an anim folder and in these animations, folder creates a bounce.XML file and used these code to a translation of an object there x,y coordinate for Splash Screen Animation UI Design.

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:fillAfter="true"
    android:interpolator="@android:anim/bounce_interpolator">

    <scale
        android:duration="3000"
        android:fromXScale="1.0"
        android:fromYScale="0.0"
        android:toXScale="1.0"
        android:toYScale="1.0" />

</set>

Android Splash Screen Animated UI Design Example

Step 2: Open your splesh_screen.xml file add an ImageView.

in your layout file, you can add an ImageView and set an image for animation.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:orientation="vertical"
    android:gravity="center"
    android:background="@drawable/back"
    android:layout_height="match_parent"
    tools:context="codeplayon.com.restaurant.Splesh_Screen">
<ImageView
    android:id="@+id/imageView1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:src="@drawable/logo1"/>

</LinearLayout>

Step 3: Open Your Splesh_Screen.java file and used animation on ImageView.

in your java file, you can implement an image view and set animation on the image view.and set a bounce.xml file to the image view.

public class Splesh_Screen extends AppCompatActivity {
    ImageView imageView;
    private static int SPLASH_TIME_OUT = 6000;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        imageView=(ImageView)findViewById(R.id.imageView1);
        Animation an2= AnimationUtils.loadAnimation(this,R.anim.bounce);
        imageView.startAnimation(an2);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {

                Intent intent=new Intent(Splesh_Screen.this,Home.class);
                startActivity(intent);
                finish();

            }
        }, SPLASH_TIME_OUT);

    }
}

 

You may also like...