package com.example.myanimbeta import android.content.Intent import android.os.Bundle import android.os.Handler import android.view.animation.AnimationUtils import android.widget.TextView import androidx.appcompat.app.AppCompatActivity class SplashScreen : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_splash_screen) val topAnim = AnimationUtils.loadAnimation( this, R.anim.splash_top_animation) val middleAnim = AnimationUtils.loadAnimation( this, R.anim.splash_middle_animation) val bottomAnim = AnimationUtils.loadAnimation( this, R.anim.splash_bottom_animation) val topTextV: TextView = findViewById(R.id.topTextView) val middleTextV: TextView = findViewById(R.id.middleTextView) val bottomTextV: TextView = findViewById(R.id.bottomTextView) topTextV.startAnimation(topAnim) middleTextV.startAnimation(middleAnim) bottomTextV.startAnimation(bottomAnim) val mainIntent = Intent(this@SplashScreen, ActivitySecond::class.java) Handler().postDelayed({ startActivity(mainIntent) finish() }, 6000 ) } }