Home > Blockchain >  how to move from animation to an activity in kotlin?
how to move from animation to an activity in kotlin?

Time:04-24

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 ?

CodePudding user response:

startActivity.kt

val intent = Intent(this, goActivity::class.java)
        startActivity(intent)
        intent.putExtra("valaueName", value)   //eg:value string
        intent.putExtra("valaueName2", value2) //eg: value2 int
        finish()

goActivity.kt

val value = intent.getStringExtra("valueName").toString()
val value2 = intent.getIntExtra("valueName2").toString()

CodePudding user response:

@Ömer Seyfettin Yavuzyiğit I tried to use it but without success, I attached 2 images showing my code so hopefully you can see what is written so far and how I can implement your code in mine! Thanks

  • Related