0

I made a splash screen with motion layout. These are the codes.

the splash screen xml file

the .kt file that has the splash screen ( 1/2 )

the .kt file that has the splash screen ( 2/2 )

I am trying to move from MainActivity.kt(which is where the splash screen starts) to Intent_example2.kt.

I heard that that I have to deal with the Manifest.xml file, but I don't know the code for it.

Please help me , thank you.

1 Answers1

1

onTransitionCompleted()

Here, you're trying to move from MainActivity to MainActivity.

Change

startActivity(Intent(this@MainActivity, MainActivity::class.java)) 

To

startActivity(Intent(this@MainActivity, Intent_example2::class.java)) 

And it should work fine.

Vikas Choudhary
  • 544
  • 5
  • 10
  • @Abbas The snapshot I posted is originally from the question (there are links in the question you can see the image there). I just highlighted the mistake in the Activity classes in `startActivity()` and posted solution code with reference to the original code in the question. Please go through the snaps in the question. – Vikas Choudhary Sep 20 '21 at 06:27