Building Counter App Like Flutter Using Jetpack Compose 1.0.
Having been in beta for five months, Jetpack Compose is now officially getting its 1.0 release for production-ready on 28 July.
Google and JetBrains (the company behind Kotlin), created this declarative UI framework to replace the standard XML layout engine in Android. Compose lets developers create their layouts and accompanying logic all in Kotlin.
To begin, download the most recent version of Android Studio Arctic Fox, and create an app using the Empty Compose Activity template. The default template already contains some Compose elements.
Click on File > New > Import Sample from the menu bar Select one of the Jetpack Compose sample apps
Either change the Application name and Project location or keep the default values and click Finish. Note that, in the Language dropdown menu, Kotlin is the only available option because Jetpack Compose works only with classes written in Kotlin.
It takes some time to build Gradle and Android Studio downloads the sample app to the path you specified and opens the project. You can then inspect
Our Project is ready Now just take a look at Project and some files which jetpack compose create.
Color.kt- This file is used to define all colors using hexacode for the project.
Shape.kt- This file is used to define all shapes for the project.
Type.kt- This file is used to define all typography to define text style like -font family, font size, etc.