Android Development

Write Less code with New Android Native UI Toolkit Jetpack Compose

Less Code with Enhanced Android UI Development

Jetpack compose UI Toolkit

Are you an Android Developer? If Yes then very Exciting news for you In the recent update of Android Studio They released the Modern, Native UI Design Toolkit for Faster Native Android Development with less amount of Code.

One of the major headaches of Every Programmer is to writing lengthy code while programming the android app or any kind of Software So as per the recent Update Jetpack native UI Toolkit They are launching New Enhanced Native Mobile Design toolkit for faster Design and Development Called “Jetpack Compose”.

What is Jetpack Compose?

Jetpack Compose is a Modern UI toolkit Build Native Android Application with Faster Coding Functions and XML Resources with Kotlin APIs Included in the Bundle of Jetpack Compose. The main goal is

“ Write Less Code, Faster Development Environment”

Note: Jetpack Compose is currently available as an Alpha version. and all the APIs and design surfaces mutable till now.

Also, Jetpack Compose provides declarative Functions so you can directly apply the functions while creating any widget in the XML File you don’t need any further changes.

Example of @Composable Function Using Text Element

The main Base of the Jetpack Compose is @composable Functions that provide Data Dependencies directly in your code by using Annotation above your Function Name.

class MainActivity : AppCompatActivity() {override fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)setContent {Text(“Hello world!”)}}}@Composablefun Greeting(name: String) {Text (text = “Hello $name!”)}@Preview@Composablefun PreviewGreeting() {Greeting(“Android”)}

Example of Column Function in Jetpack Compose

You can Arrange your list elements vertically using column Function in Jetpack compose directly and all the elements that are available in the list are arranged automatically in full stacked order. Also, you can give Particular Margins and style your elements with images.

@Composablefun NewsStory() {val image = imageResource(R.drawable.header)Column(modifier = Modifier.padding(16.dp)) {Image(image)Text(“A day in Shark Fin Cove”)Text(“Davenport, California”)Text(“December 2018”)}}

Great Work!!!

Conclusion

Hereby we conclude that there are lots of Functions is available for styling the elements like column, modifier, spacer, shape, clip, etc. to design your User interface very fast and also codebase is totally less so you can easily build your modern UI Structure for your app using Native UI toolkit Jetpack Compose.

Content Creator | Founder at Durvasa Infotech | Growth hacker | Entrepreneur and geek | Support on https://ko-fi.com/dcforums

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

HTML Table

Kafka Series: 1. Install Ubuntu 18.04 LTS Server on VirtualBox.

How I discovered GIS and GIS development ?

The attitude of doing the last-minute change in production code kills the developer

How to SAML federate your AWS account with G Suite

CMS War — WordPress Vs Joomla Vs Drupal — Techtic Solutions

It’s Hurricane Season!

Using Nested Routers DRF-Nested Routers in Django Rest framework

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Darshan Chauhan

Darshan Chauhan

Content Creator | Founder at Durvasa Infotech | Growth hacker | Entrepreneur and geek | Support on https://ko-fi.com/dcforums

More from Medium

Simple Profile App Example in Jetpack Compose

Integration of Huawei Ads Kit and Analytics Kit in Money Management Android app (Kotlin) — Part 2

Intro to Jetpack Compose

Basics for your first Android App: REST API, Database, and Fragment Navigation