# jetpack-compose-tutorial

Published articles for jetpack-compose-tutorial.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Jetpack Compose Bottom Border

DevFeed: [Jetpack Compose Bottom Border](<https://devfeed.tech/articles/jetpack-compose-bottom-border-25848.md>)

Original publisher: [Read original article](<https://medium.com/@banmarkovic/jetpack-compose-bottom-border-8f1662c2aa84?source=rss-8aced922ece------2>)

Author: Ban Markovic

Published: 2022-11-14T10:36:16Z

Content type: tutorial

Language: en

Sources: [Stories by Ban Markovic on Medium](<https://devfeed.tech/sources/stories-by-ban-markovic-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Canvas](<https://devfeed.tech/topics/canvas.md>), [Android](<https://devfeed.tech/topics/android.md>), [ui](<https://devfeed.tech/topics/ui.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [article](<https://devfeed.tech/tags/article.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [jetpack-compose-tutorial](<https://devfeed.tech/tags/jetpack-compose-tutorial.md>)

### AI overview

A tutorial showing how to draw a bottom border on a Jetpack Compose UI component using Canvas, Modifier.drawBehind, DrawScope, and drawLine. It explains the coordinate system and converting dp stroke width to pixels.

### Source excerpt

Android Jetpack Compose provides us API for drawing borders on any UI component, and it couldn't be any easier. But, drawing single edge borders isn't supported yet, by default. Goal This article will show you a custom way of drawing bottom borders step by step using Canvas. Hopefully at the end of it, you will learn not only how to draw a bottom border, but you will be able to use that knowledge to draw any border on any side (top, bottom, left, right) you want. Solution Drawing something on the screen basically leads to accessing the canvas and telling it where to draw which pixel. Luckily for us, Jetpack Compose's Modifier element comes with the method drawBehind, that provides us access to the canvas behind given UI element with a lot of drawing options through DrawScope. drawBehind -- Draw into a Canvas behind the modified content. DrawScope -- Creates a scoped drawing environment with the provided Canvas. The DrawScope has a lot of helper methods for drawing onto our canvas. In our case, we want to draw the bottom border, which is basically the simple line that is placed at the bottom of our UI component. By having access to the DrawScope and its Canvas, we can use DrawScope's helper function drawLine to draw our bottom border. drawLine To draw any line, there are a couple of parameters we need to define: color, width, start point, end point. In this example, we will draw a red line with the width of 4 dp (but you can change this to your liking, sky is the limit). The only step that is missing for drawing our bottom border is defining our start and end point. Let's first look at our Text UI component to have a better understanding of the canvas that we are working with. In this example, our canvas is basically everything that is gray, and the bottom of it we want to draw a line. Canvas is represented with a coordinate system, so every point is defined by two values x and y. Top-left corner of our UI component's canvas, is represented with (0, 0). Bottom-right co

## Kotlin Mumbai: Exploring Future of Android UI With Jetpack Compose

DevFeed: [Kotlin Mumbai: Exploring Future of Android UI With Jetpack Compose](<https://devfeed.tech/articles/kotlin-mumbai-exploring-future-of-android-ui-with-jetpack-compose-28380.md>)

Original publisher: [Read original article](<https://siddroid.com/post/post-exploring-future-of-android-with-jetpack-compose-siddhesh-patil/>)

Author: Siddhesh Patil

Published: 2020-12-26T14:18:27Z

Content type: article

Language: en

Sources: [Sid Patil - Android Engineer and Kotlin Advocate](<https://devfeed.tech/sources/sid-patil-android-engineer-and-kotlin-advocate.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [ui](<https://devfeed.tech/topics/ui.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [best-android-developer-groups-in-india](<https://devfeed.tech/tags/best-android-developer-groups-in-india.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-cookbook](<https://devfeed.tech/tags/compose-cookbook.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [delivery-hero](<https://devfeed.tech/tags/delivery-hero.md>), [developer-communities-in-mumbai](<https://devfeed.tech/tags/developer-communities-in-mumbai.md>), [event](<https://devfeed.tech/tags/event.md>), [gurupreet-singh-foodpanda](<https://devfeed.tech/tags/gurupreet-singh-foodpanda.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [jetpack-compose-tutorial](<https://devfeed.tech/tags/jetpack-compose-tutorial.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-user-group-mumbai](<https://devfeed.tech/tags/kotlin-user-group-mumbai.md>), [kug](<https://devfeed.tech/tags/kug.md>), [meetup](<https://devfeed.tech/tags/meetup.md>), [talks](<https://devfeed.tech/tags/talks.md>), [ui](<https://devfeed.tech/tags/ui.md>), [user-interfaces](<https://devfeed.tech/tags/user-interfaces.md>), [using-jetpack-compose-on-android](<https://devfeed.tech/tags/using-jetpack-compose-on-android.md>), [video](<https://devfeed.tech/tags/video.md>)

### AI overview

This article describes a Kotlin Mumbai talk about Jetpack Compose, a declarative approach to building Android user interfaces. The talk covers Compose use cases and how to quickly bootstrap a Compose project.

### Source excerpt

Compose is a new declarative way of making user interfaces on Android. In this talk Gurupreet shares how one can quickly bootstrap a project with compose.