Skip to content

Instantly share code, notes, and snippets.

@Karthik128
Created July 8, 2015 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Karthik128/f2a03977951439fb667d to your computer and use it in GitHub Desktop.
Save Karthik128/f2a03977951439fb667d to your computer and use it in GitHub Desktop.
package com.androidwebviewapp.karthik;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
@SuppressLint("NewApi")
public class Splash extends Activity {
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
ActionBar actionBar = getActionBar();
actionBar.hide();
Thread t =new Thread(){
public void run(){
try{
sleep(10000);
}catch(InterruptedException e){
e.printStackTrace();
}finally{
Intent i =new Intent(Splash.this,MainActivity.class);
startActivity(i);
}
}
};
t.start();
}
@Override
public void onPause(){
super.onPause();
finish();
}
}
/**
* Created by Karthik M on 05-Jul-15.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment