Learning Android Development
Simple Android Animation with Jetpack Compose
Learning basic custom animation with Jetpack Compose
Jetpack Compose is not at Alpha release, while SwiftUI is already out ready for production usage. It’s time to start learning Jetpack Compose. I like to learn by doing something most basic, e.g. drawing a clock hands.
I’m sharing below, that even if you don’t have Android experience, you can still follow along. Let’s explore together.
As Jetpack Compose is not production-ready, you need to install Android Studio 4.2 and set up as per the guide here before proceeding below.
Once you have set up, you can continue the below.
Setup the MainActivity
Unlike conventional Android Development, we no longer need layout.xml file. We can create a @Composable
function where the MainActivity
can use to render the user interface, as shown below.
@Composable
fun Clock(modifier: Modifier = Modifier) {
// Something to be filled up later
}class MainActivity…