Advertisement
euis_kusesa

MainActivity.java

Dec 23rd, 2018
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1. package com.example.laptoprpl.splashscreen;
  2.  
  3. import android.app.Activity;
  4. import android.content.Intent;
  5. import android.os.Bundle;
  6.  
  7. public class Screen extends Activity {
  8.  
  9.     @Override
  10.     protected void onCreate(Bundle savedInstanceState) {
  11.         super.onCreate(savedInstanceState);
  12.         setContentView(R.layout.activity_screen);
  13.         Thread thread = new Thread() {
  14.             public void run () {
  15.                 try {
  16.                     sleep(7000);
  17.                 } catch (InterruptedException e) {
  18.                     e.printStackTrace();
  19.                 } finally {
  20.                     startActivity(new Intent(Screen.this, Menu.class));
  21.                     finish();
  22.                 }
  23.             }
  24.         };
  25.         thread.start();
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement