Search code examples
kotlinanimationandroid-activity

how to move from animation to an activity in kotlin?


In my project/test app so far I have managed to implement an animation from Lottie animations that displays without any problem. But when the animation is over it doesnt change to another activity. It simply just stays on screen.

Been trying to figure out how to make it so that once the animation has finished,it will automatically be moved to the main fragment ( with Username, password ect) but so far I cant figure it out.

Anyone got a solution/ tips ?


Solution

  • GlobeActivity.kt

    Handler(Looper.getMainLooper()).postDelayed({
                val intent = Intent(this, MainActivity::class.java)
                startActivity(intent)
                finish()
            }, 3000)