Jetpack Compose

The new, native, and modern Android UI toolkit.

Pull-to-Refresh featured image

How to Add Pull-to-Refresh to Your Android App with Jetpack Compose

In this post, I will show you how to use the PullRefreshIndicator composable to add Pull to refresh behavior to your list. Here is a GIF of what we are going to create: Prequesties In your app-level build.gradle add the following to your dependencies {…}: You only need implementation(“androidx.compose.material:material:1.5.3”), but in my code, I will […]

How to Add Pull-to-Refresh to Your Android App with Jetpack Compose Read More »

How To Make Tab Indicator Behind The Tab In TabRow – Jetpack Compose Android

In Jetpack compose, the tab indicator is rendered in front of the tabs by default. Thus, if you wanted to create your own custom indicator that fills the tab you will notice that the tab is covered behind it. Fixing this issue is as easy as adding just a single modifier called zIndex.

How To Make Tab Indicator Behind The Tab In TabRow – Jetpack Compose Android Read More »

How to change touchSlop (or any other property) in ViewConfiguration of current composable in JetpackCompose

In this tutorial, I will show you how you can change the ViewConfiguration touchSlop value which is defined as the “Distance in pixels a touch can wander before we think the user is scrolling”. From its definition, you can see that it is sometimes useful to change it to any value other than the default value. For example, if you want to create a drawing feature or if you want to implement a draggable composable without waiting for touch to wander before considering it as a drag gesture.

How to change touchSlop (or any other property) in ViewConfiguration of current composable in JetpackCompose Read More »

Scroll to Top