VOOZH about

URL: https://www.geeksforgeeks.org/kotlin/create-bounce-animation-on-touch-in-android-jetpack-compose/

⇱ Create Bounce Animation on Touch in Android Jetpack Compose - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Create Bounce Animation on Touch in Android Jetpack Compose

Last Updated : 23 Jul, 2025

In this article, we will take a look at how to create a bounce animation when the user taps anything, further it can be extended as per the use of the App.

Prerequisites:

Step by Step Implementation

Step 1: Create a New Project

To create a new project in the Android Studio, please refer to How to Create a new Project in Android Studio with Jetpack Compose.

Note: Select Kotlin as the programming language.

Step 2: Working with the MainActivity.kt

Create an enum class that stores the states (Released / Pressed).

enum class BounceState { Pressed, Released }

MainActivity.kt:

Output:

Comment
Article Tags:

Explore