Android/Java: Crear un SplashScreen para nuestra aplicación

 




Codigo java para el onCreate:

 

  1. Thread myThread = new Thread(){
  2.             @Override
  3.             public void run(){
  4.                 try {
  5.                     sleep(2000);
  6.                     Intent intent = new Intent(getApplicationContext(), MainActivity.class);
  7.                     startActivity(intent);
  8.                     finish();
  9.                 } catch (InterruptedException e){
  10.                     e.printStackTrace();
  11.                 }
  12.             }
  13.         };
  14.  
  15.         myThread.start();


Comments

Popular posts from this blog

Solve SecurityError: localStorage is not available for opaque origins React Native

Android/Java: Video de fondo en nuestro Login