Created
July 7, 2021 13:48
-
-
Save iamnaran/6252363c316b6e07f12943036db4b077 to your computer and use it in GitHub Desktop.
Splash Activity
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
public class SplashActivity extends AppCompatActivity { | |
private final int SPLASH_TIME_OUT = 3000; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_splash); | |
new Handler().postDelayed(() -> { | |
Intent i = new Intent(SplashActivity.this, MainActivity.class); | |
startActivity(i); | |
finish(); | |
}, SPLASH_TIME_OUT); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment