Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import android.support.v7.app.AppCompatActivity;
- import android.os.Bundle;
- import android.content.Intent;
- import android.os.Handler;
- public class Splash extends AppCompatActivity {
- private static int display_time = 3000;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_splash);
- new Handler().postDelayed(new Runnable() {
- //Showing splash screen with a timer.
- @Override
- public void run() {
- Intent nextScreen = new Intent(getApplicationContext(), HomeScreen.class);
- startActivity(nextScreen);
- finish();
- }
- }, display_time);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement