forked from hush/SilentDragonAndroid-old
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
884 B
30 lines
884 B
// Copyright 2019-2020 The Hush developers
|
|
// Released under the GPLv3
|
|
package org.myhush.silentdragon.ui
|
|
|
|
import androidx.appcompat.app.AppCompatActivity
|
|
import android.content.Intent
|
|
import android.os.Bundle
|
|
import android.os.Handler
|
|
import org.myhush.silentdragon.MainActivity
|
|
import org.myhush.silentdragon.R
|
|
|
|
class SplashActivity : AppCompatActivity() {
|
|
|
|
// This is the loading time of the splash screen
|
|
private val SPLASH_TIME_OUT: Long = 3000 // 3 seconds
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
super.onCreate(savedInstanceState)
|
|
setContentView(R.layout.activity_splash)
|
|
|
|
Handler().postDelayed({
|
|
// This method will be executed once the timer is over
|
|
startActivity(Intent(this, MainActivity::class.java))
|
|
|
|
// close this activity
|
|
finish()
|
|
}, SPLASH_TIME_OUT)
|
|
}
|
|
|
|
}
|
|
|