Category "android-jetpack-compose"

jetpack compose: scroll to bottom listener (end of list)

I am wondering if it is possible to get observer inside a @Compose function when the bottom of the list is reached (similar to recyclerView.canScrollVertically(

How to impl LazyVerticalGrid with set full span or dynamic num of GridCells.Fixed in jetpack compose?

Just like Sliver in Flutter or StaggeredGridLayoutManager in android reyclerview so I can insert a banner or some thing else into grid layout

Show custom alert dialog in Jetpack Compose

I am searching how create custom dialog in Jetpack Compose. In XML or Material Design we can create easily custom Dialog in which we can take user input, radio

Jetpack Compose - How to search and display specific data from room in LazyColumn?

I want to fetch data from room table using a search query and present the result in LazyColumn instead of the someList I present there. In other words, how to i

Jetpack Compose: Text remains black even when the theme is dark

The text in the app still remains black even if the theme is set to dark and background is dark. Just take a look at the code and screenshots below. Theme.kt (h

Is there a way to set auto refresh the jetpack compose preview?

I just started to use the Jetpack compose toolkit. I added the @Preview and a set showBackground = true, showSystemUi = true as parameters and it works really g

Koin 3.2/Compose - injecting an activity-scoped viewmodel from a composable

I have scoped a viewmodel to an activity like this: scope<MyActivity> { scoped<UseCase1> { UseCase1Impl(get()) } scoped<UseCase2&

Jetpack compose: How to detect what is causing a Composable to recompose

I'm starting to notice some jank in my app and I believe the cause is composables being re-composed when they should not. I've detected a few user interactions

How to communicate betweeen viewmodels in jetpack compose

I have a home screen in my application that is basically content with a navigation bar Each of the three selections of the navigation bar lead to a different sc

TopAppBar flashing when navigating with Compose Navigation

I have 2 screens which both have their own Scaffold and TopAppBar. When I navigate between them using the Jetpack Navigation Compose library, the app bar flashe

Scroll to top when adding new items

I have a usecase where I would like a LazyColumn to scroll to the top if a new item is added to the start of the list - but only if the list was scrolled to top

What does mean @Stable and @Immutable annotation in Jetpack Compose?

While studying through the Jetpack Compose sample project, I saw @Stable and @Immutabe annotations. I've been looking through the Android documentation and GitH

How to apply a mask date (mm/dd/yyyy) in TextField with Jetpack Compose?

I have a TextField in which there cannot be more than 10 characters, and the user is required to enter date in the format "mm/dd/yyyy". Whenever user types firs

Dynamically shorten text to avoid ellipsizes in jetpack compose

I'm looking to implement a calendar-like application including a day-detail screen in Jetpack Compose. This screen has a TopAppBar, in which i'd like to show th

How to integrate autofill in Jetpack Compose

I want to provide some autofill functionality in my app (email and password) that is written completely using Jetpack compose. I came across this blog post and

Angled gradient background in Jetpack Compose

I am trying to draw a gradient background in Jetpack Compose, and I would like the gradient to have a fixed angle regardless of the shape of the object I'm draw

How to use clipboard service in jetpack compose

I want to copy a string to the user's mobile clipboard but I don't have any idea how I can use clipboard services in jetpack compose, If there is any alternativ

pointerInput of Modifier takes no actions

I need a Card() Composable with a normal press and a long press functionality for a custom Card Composable. The thing is Card() has its own value called onClick

Jetpack Compose TopAppBar with dynamic actions

@Composable fun TopAppBar( title: @Composable () -> Unit, modifier: Modifier = Modifier, navigationIcon: @Composable (() -> Unit)? = null,

MutableStateFlow and Firebase console with jetpackCompose

I don't know why, but my text in MutableStateFlow doesn't change when i'm changing the string in firebase console. Can someone help me and say why ? I'm putting