
Jetpack Compose - Getting Started
So what is Jetpack Compose ?π€
Jetpack compose is a modern UI toolkit from google which simplifies and accelerates UI development on Android. Or In simple terms helps us to generate a list of data on our UI screen without having to create half a dozens of different layout files. But in broad terms or even better, in google's terms Jetpack Compose is Androidβs modern toolkit for building native UI. It simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs.
With jetpack compose we can manage our Layout and data both in a single file with a single language i.e Kotlin. It gets rid of .xml files for storing layout. You can learn more about Jetpack here (opens in a new tab).
Prerequisite
Jetpack Compose uses Kotlin to build UIs or manage state, hence a prior knowledge of Kotlin is must. Also little familiarity with Android development Will be good.
Setting Up development Environment π©βπ»
To create apps using Jetpack Compose, we need the obvious Android Development IDE , i.e Android Studio. But as if now , this option is available only in newer version which may not be in stable channel so download Android Studio Artic Fox From here (opens in a new tab). Download the android studio and it will walk you through with downloading SDK and a emulator, you can leave the emulator , if you don't want that.
Creating a Project
Once you have finished Downloading Android Studio and SDk. Launch the android studio and click on the New Project button and then there choose Empty Compose Activity.
Click next and feel free to change Your app name , package name, Location and Min SDK as per your requirement.
Click Finish and you will be Good to go.
You can Run this default app in your emulator. In the next lesson we will talk about writting a Hello World App on our own from scratch.π