Skip to content

Instantly share code, notes, and snippets.

@madindo
Created July 19, 2019 08:02
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 madindo/28da2b000710d5fed82c4c52321f1556 to your computer and use it in GitHub Desktop.
Save madindo/28da2b000710d5fed82c4c52321f1556 to your computer and use it in GitHub Desktop.
package com.madindo.fotofilio;
import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
private static int SPLASH_TIME_OUT = 4000;
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.SplashTheme);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
new Handler().postDelayed(new Runnable() {
@Override
public void run(){
Intent homeIntent = new Intent(MainActivity.this, HomeActivity.class);
startActivity(homeIntent);
finish();
}
}, SPLASH_TIME_OUT);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment