Created
July 8, 2015 19:23
-
-
Save Karthik128/f2a03977951439fb667d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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