Created
August 19, 2015 08:23
-
-
Save crgarridos/c1d97dd12acde7341f51 to your computer and use it in GitHub Desktop.
Simple Splash Activity
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
public class SplashActivity extends BaseActivity { | |
private final int SPLASH_DISPLAY_LENGHT = 1000; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
new Handler().postDelayed(new Runnable() { | |
@Override | |
public void run() { | |
// Create an Intent that will start the MainActivity. | |
Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class); | |
SplashActivity.this.startActivity(mainIntent); | |
SplashActivity.this.finish(); | |
} | |
}, SPLASH_DISPLAY_LENGHT); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment