package org.Kalakshetra.Youth;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

import org.Kalakshetra.Youth.R;

public class SplashActivity extends AppCompatActivity {

    ImageView animLogo;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);

        animLogo = findViewById(R.id.animLogo);

        Animation logo = AnimationUtils.loadAnimation(this, R.anim.logo_splash);

        animLogo.setAnimation(logo);

        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                Intent iHome = new Intent(SplashActivity.this, MainActivity.class);
                startActivity(iHome);
                finish();
            }
        }, 4000);

    }
}