Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import androidx.appcompat.app.AppCompatActivity
- import android.os.Bundle
- class SplashActivity : AppCompatActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_splash)
- Handler().postDelayed({
- val intent = Intent(this, MainActivity::class.java)
- intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION)
- startActivity(intent)
- finish()
- },DURATION)
- }
- companion object {
- private const val DURATION : Long = 3000
- }
- override fun onBackPressed() {
- super.onBackPressed()
- }
- }
Add Comment
Please, Sign In to add comment