Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.membuatsplash;
- import android.app.Activity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.view.Window;
- public class SplashScreen extends Activity{
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- // TODO Auto-generated method stub
- super.onCreate(savedInstanceState);
- this.requestWindowFeature(Window.FEATURE_NO_TITLE);
- setContentView(R.layout.splash);
- Thread timer =new Thread(){
- public void run(){
- try {
- sleep(3500);
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- } finally{
- finish();
- Intent lay2 =new Intent(SplashScreen.this, MainActivity.class);
- startActivityForResult(lay2, 0);
- }
- }
- };
- timer.start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment