package com.virtual.tour.arquelogia.vista;

/**
 * Created by Roger Gomez
 */

import android.app.Activity;
import android.content.Intent;
import android.os.Handler;
import android.os.Bundle;

import com.virtual.tour.arquelogia.R;


public class SplashScreen extends Activity {

    // Tiempo de duración de la splashScreen
    private static int SPLASH_TIME_OUT = 3000;

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


        new Handler().postDelayed(new Runnable() {

            /*
             * Showing splash screen with a timer. This will be useful when you
             * want to show case your app logo / company
             */

            @Override
            public void run() {
                // Una vez pasados 3 segundos cerramos esta activity y mostramos la activity principal
                Intent i = new Intent(SplashScreen.this, MainActivity.class);
                startActivity(i);

                // cerramos esta activity

                finish();
            }
        }, SPLASH_TIME_OUT);
    }

}
