Created
December 6, 2019 10:35
-
-
Save prathamesh-mutkure/a09be503cc246f19ddc41308577cb9cb to your computer and use it in GitHub Desktop.
This file contains hidden or 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 gci.omrs.splash; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.os.Handler; | |
public class SplashActivity extends AppCompatActivity { | |
private static final int SPLASH_TIMEOUT = 3000; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_splash); | |
// This will load our Main Activity after specified time | |
new Handler().postDelayed(new Runnable() { | |
@Override | |
public void run() { | |
// Intent for jumping to MainActivity | |
Intent intent = new Intent(SplashActivity.this, MainActivity.class); | |
startActivity(intent); | |
finish(); | |
} | |
}, SPLASH_TIMEOUT); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment