package com.zxhyis.tools.net.xin

import android.annotation.SuppressLint
import androidx.lifecycle.lifecycleScope
import com.zxhyis.tools.base.TopActivity
import com.zxhyis.tools.databinding.ActivitySplashBinding
import com.zxhyis.tools.logic.startActivity
import com.zxhyis.tools.ui.home.MainActivity
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch

@SuppressLint("CustomSplashScreen")
class SplashActivity : TopActivity<ActivitySplashBinding>() {


    override fun getViewBinding1(): ActivitySplashBinding {
        return ActivitySplashBinding.inflate(layoutInflater)
    }

    override fun init() {


        lifecycleScope.launch {
            delay(2000)
            startActivity<MainActivity>()
            finish()

        }
    }

}