SplashActivity.kt 903 Bytes
package com.focasoftware.deboinventariov20.ui

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import com.focasoftware.deboinventariov20.R

class SplashActivity : Activity() {

	override fun onCreate(savedInstanceState: Bundle?) {
		super.onCreate(savedInstanceState)
		setContentView(R.layout.activity_splash)
		//window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_FULLSCREEN or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY

		val bac = object  : Thread(){
			override fun run(){
				try {
					Thread.sleep(5)
					val intent = Intent(baseContext, MainActivity:: class.java)
					startActivity(intent)
					finish()
				} catch (e : Exception){
					e.printStackTrace()
				}
			}
		}
		bac.start()
	}
}