Search code examples
android-studiosplash-screenandroid-motionlayout

Start Motion Layout automatically (Android Studio)


I want to make an animated splashscreen and the Motion Layout should start automatically when you start the app. What can I do to make the Motion Layout start automatically?


Solution

  • Add the line autoTransition="animateToEnd" to your transition

    <Transition
        motion:constraintSetStart="@+id/start"
        motion:constraintSetEnd="@+id/end"
    
        motion:autoTransition="animateToEnd"
    
        motion:duration="1000">