Category "android-jetpack-compose"

Can I store a composable function in a variable?

In Kotlin, function is a first-class citizen. We can store a function in a variable as below val functionVariable: () -> Unit = ::myFunction fun myFunction(

Ripple with rounded corners Jetpack Compose

In this answer I got wrong ripple animation. Do you know how to create ripple with rounded corners using Jetpack Compose? With default ripple I have this: Code:

How to make element fill the remaining space inside a Row or a Column in Jetpack Compose

I am trying to show two text messages besides each other in a row but when the size of the first text is big, the second view gets pushed out of the screen as s

Using rememberCoroutineScope() vs LaunchedEffect

Context In Jetpack compose, we have the option of using rememberCoroutineScope() as well as using the LaunchedEffect composable in order to use coroutines / run

how to progressively add drawable to a canvas?

I have points generated one by one, and when a new point is generated, I want to draw a line segment connecting with the previous point. Like this: var x by re

An alternative solution to set negative padding values in Jetpack Compose? (java.lang.IllegalArgumentException: Padding must be non-negative)

I'm trying to assign a negative value to the padding modifier but the app had crashed. Have a look at my code. Thanks if you can help or give me an alternative

Jetpack Compose Scrollbars

Is there any way to add Scrollbars to add LazyColumn (ScrollableColumn is deprecated). The Javadoc doesn't mention anything about Scrollbars in Jetpack Compose.

What is the difference between "remember" and "mutableState" in android jetpack compose?

I'm new in jetpack compose and trying to understand the difference between remember and mutableStateOf In other words the deference between this line val text

Jetpack Compose Desktop switch to new window

Hey I'm pretty new to Kotlin and am trying my hand at a GUI as my first small project. For this I am using Jetpack Compose Desktop. I have already written a fir

Jetpack compose Google Maps does not load properly when using bottom navigation

I have been stuck on this all day. I am using the official jetpack compose google maps composable. The map is displayed on one tab of my bottom navigation. I ha

Play video from URI in Jetpack Compose android

I am trying to play a video which user selects from file explorer. Then it should open and start video as expected and as shown in below tutorial. But there is

Match Width of Parent in Column (Jetpack Compose)

By default, Column {} has the width of it's largest child element. How can I make all other elements to fit the width of the parent Column? If I use Modifier.fi

Match Width of Parent in Column (Jetpack Compose)

By default, Column {} has the width of it's largest child element. How can I make all other elements to fit the width of the parent Column? If I use Modifier.fi

how to make cursor on BasicTextField be centered on jetpack compose?

I have a problem, where I need a BasicTextField to customize the TextField as I want. Here I have tried to do a custom, but there is a problem with the cursor i

how to make cursor on BasicTextField be centered on jetpack compose?

I have a problem, where I need a BasicTextField to customize the TextField as I want. Here I have tried to do a custom, but there is a problem with the cursor i

jetpack compose: @Preview is unresolved after updating to alpha08

I updated compose libraries from alpha07 to alpha08 version = "1.0.0-alpha08" androidx.compose.ui:ui:$version androidx.ui:ui-tooling:$version But after that an

How to update jetpack compose slider state outside of the slider

So, I'm using the Jetpack compose for my app and I have a state with a float value in the viewModel. This value can be updated outside of the slider; but also f

Interaction jetpack compose with bluetooth library

how to use Android Bluetooth api in jetpack compose ? compose need state and Bluetooth api has not compostable function .i mean how to instance state for Blueto

Recompose in Android Compose

I was implementing the outlinedTextField in android using new compose library. But strangely the input data was not updating in the text field. So I searched an

Jetpack Compose take screenshot of composable function?

I want to take screenshot of specific composable function on Jetpack Compose. How can I do this? Please, anyone help me. I want to take screenshot of composable