Basics of Jetpack Compose

<p>Maybe you have seen or dabbled in a few other languages in the past and you want to learn something new. Maybe you want to try getting into mobile development. If the answer to any of those questions is yes, this is the place to start.</p> <h1>An easy prerequisite</h1> <p>If you haven&rsquo;t already, you will need to download Android Studio to follow along with this tutorial. You can find the latest version at the following link:&nbsp;https://developer.android.com/studio</p> <p>Android Studio has a very helpful feature that we will want to turn on. Jetpack Compose/Kotlin requires that we import each component, or piece of functionality that we use in our app. This allows the app to be as small as possible when running on a device, and helps to ensure that our app is as performant as possible. Turning on the Auto import/cleanup settings will save you a lot of time trying to figure out which version of a thing to import (I learned this the hard way). The screenshot below has the options we want to turn on highlighted.</p> <h1>What are views</h1> <p>Views are used to build the different elements that make up the screen of an app referred to as the User Interface or UI. In the &ldquo;hello world&rdquo; app that we get when we create a new Compose project, we see that Android Studio starts by giving us a Greeting composable and a Text component on the screen. Together these views make up the what we see in our preview.</p> <p>Some of the most common views that we will see when writing code with Jetpack Compose are:</p> <ul> <li>Column&mdash; for stacking other views vertically</li> <li>Row&mdash; for stacking other views horizontally</li> <li>Box&mdash; for stacking views on top of each other</li> <li>Text &mdash; will add any text to your screen including emojis</li> <li>Image/Icon &mdash; will allow you to use any of the built-in images, or add your own.</li> <li>Spacer &mdash; a view that will fill as much space as possible</li> </ul> <p>We will add more views to our knowledge base with time, but for now, these are the ones we will be using in this tutorial.</p> <p><a href="https://medium.com/@jpmtech/basics-of-jetpack-compose-a019a765a1bc">Click Here</a></p>