package com.example.mytipapp import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.os.Handler import android.view.animation.AnimationUtils import android.widget.TextView class SpalshScreen : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_spalsh_screen) val topAnim = AnimationUtils.loadAnimation(this, R.anim.splash_top_animation) val mdlAnim = AnimationUtils.loadAnimation(this, R.anim.splash_middle_animation) val btmAnim = AnimationUtils.loadAnimation(this, R.anim.splash_bottom_animation) val topTV: TextView = findViewById(R.id.tv_top) val mdlTV: TextView = findViewById(R.id.tv_middle) val btmTV: TextView = findViewById(R.id.tv_bottom) topTV.startAnimation(topAnim) mdlTV.startAnimation(mdlAnim) btmTV.startAnimation(btmAnim) val mainIntent = Intent(this@SpalshScreen, SecondActivity::class.java) Handler().postDelayed({ startActivity(mainIntent) finish() }, 6000 ) } }