Kodeco Forums

Android Animation Tutorial with Kotlin

In this Android animation tutorial, you will learn how to use property animations to make a fun, beautiful user interface.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/350-android-animation-tutorial-with-kotlin

I know Kotlin is bundled with Android Studio 3.0 but this isn’t stable version of the Android Studio and many people are having issues ( check the comments on other Android tutorials with Kotlin ). I wish all these Updated tutorials with Kotlin were in Android Studio 2.3.3 as we can install the Kotlin plugin and it works just fine.

P.s. I do want to thank you Ray Team again for all the work they are doing in providing quality material for the developers. :+1:

Thanks for the feedback vakas! We’ve tested each tutorial in whatever the latest release of Android Studio 3.0 is at the time of publication. Android Studio 3.0 RC2 is out now, and the final version should be out soon. Also, Android Studio 3.0 releases can be happily installed alongside 2.3.3.

We’ve preferred to use all the great new features in 3.0 and also to not require you to install the Kotlin plugin and configure Kotlin in the project, since that’s taken care of for you in Android Studio 3.0. The sample projects in the tutorials are all configured with Kotlin.

Are there any particular issues you’re seeing that we can help you with solving? Usually it’s just a matter of updating the Gradle plugin when prompted to do so by Android Studio 3.0.

Thanks again!

Thank you very much The Ray team for excellent kotlin Animation tutorial.

Animating colors is failing for me, in

    //1
    val objectAnimator = ObjectAnimator.ofObject(
            frameLayout,
            "backgroundColor",
            ArgbEvaluator(),
            ContextCompat.getColor(this, R.color.background_from),
            ContextCompat.getColor(this, R.color.background_to)
    )

background_from and background_to are both unresolved references.

Any suggestions?

@lisaluo Can you please help with this when you get a chance? Thank you - much appreciated! :]

@gotmikhail hi there! These are both color resource values you should see in colors.xml, please make sure you are importing the correct R file to access these colors (e.g. import com.raywenderlich.rocketlauncher.R ). Android has a lot of system R compiled resource files and we want to be sure we’re using our own!

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!