Advertisement
fakhrycodepolitan

ActivitySplash.kt

Nov 23rd, 2022 (edited)
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.92 KB | Source Code | 0 0
  1. package com.mch.ktm.kerjaanku.view
  2.  
  3. import android.content.Intent
  4. import android.os.Bundle
  5. import android.os.Handler
  6. import android.os.Looper
  7. import androidx.appcompat.app.AppCompatActivity
  8. import com.mch.ktm.kerjaanku.databinding.ActivitySplashBinding
  9. import com.mch.ktm.kerjaanku.main.MainActivity
  10.  
  11. class ActivitySplash : AppCompatActivity() {
  12.  
  13.     private lateinit var binding: ActivitySplashBinding
  14.  
  15.     override fun onCreate(savedInstanceState: Bundle?) {
  16.         super.onCreate(savedInstanceState)
  17.         binding = ActivitySplashBinding.inflate(layoutInflater)
  18.         setContentView(binding.root)
  19.  
  20.         Handler(Looper.getMainLooper()).postDelayed(
  21.             {
  22.                 val intent = Intent(this, MainActivity::class.java)
  23.                 //Toast.makeText(this, "LOOPER", Toast.LENGTH_SHORT).show()
  24.                 startActivity(intent)
  25.                 finish()
  26.             }, 2000
  27.         )
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement