Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 188.8.131.52 release ready!
Owner and Founder. Opencart
This is time to say bye bye to layout xml. Android Jetpack Compose is toolkit to build Android App UI. You don’t need to create any xml class for UI. You need to call Jetpack Compose functions for creating Native Android App UI.
We use ‘setContent’ block to create UI in Android Jetpack. I don’t need to create any xml class and set in Activity. We call composable methods in this block.
These functions are used to define UI functions for Android App. For creating composable functions, you need to add @Composable annotation to the function name. Composable function can be only called by comosa
Let’s take an example :
We use preview functions to check created in Android Studio without running app again and again in device. Just like xml, in jetpack we can create our layout preview. For this, we need to create Preview function of our composable function. Add preview in the prefix of function name and all our composable function inside this preview method. Also, we need to add @Preview & @Composable annotation.
If there is any error in your code, it will not create preview & show you error as well.
NOTE : We need alteast Android Studio version 4.0 for preview functions. You can download latest Android Studio version from below link :
Current canary build of Android Studio
This is basic introduction of Android Jetpack.
Hope, this blog is helpful for you.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.