Category "android-jetpack-compose"

Android Jetpack Compose white TabRow

I am trying to get Tabs working with a TabRow on Android with compose. What I'd like is the TabRow to have a white background. The default color seems to be thi

How to make live update of glance widget?

Is that possible to make live update the data of Widget using Glance jetpack compose ? Like update data while database is changes . For example while I am using

Jetpack compose display html in text

I have a string that contains html, how can I display this in a Jetpack compose Text? In a TextView I would use a Spanned and do something like: TextView.setTex

Change the radius of the border for OutlinedTextField

Is it possible to change the radius of the border of an OutlinedTextField. I want to achieve something like this I can not use Modifier.border because it just

Do I still need to use traditional way to implement Preferences Settings Screen in Jetpack Compose?

At present I use Jetpack Compose in my Android Studio project. I find many projects still to use traditional way to implement a Preferences Settings Screen afte

Why can't I use `AnimatedVisibility` in a `BoxScope`?

I have a layout which looks like this: Row { ... Box( modifier = Modifier .fillMaxHeight() .width(5

Itemdecoration in Jetpack compose

I am currently in the process of evaluating whether or not we can migrate our rather complex UI to jetpack compose at this stage and I am struggling with the fo

Android Studio live preview requires project rebuild

I decided to make an application on jetpack compose but when I download the Android Studio canary version 2021.1.1.1 and I try to write some code to see the cha

How do we get the position/size of a Composable in a screen?

In Compose, how do we get the position or size of a Composable in a screen ? For example, I'm trying to focus the map camera between specific bounds and adding

Use Dialog as navigation destination with jetpack compose

A dialog can have a rather complex ui, acting more like a floating screen rather than a typical AlertDialog. Therefore it can be desired to let the dialog have

java.lang.IllegalStateException when using State in Android Jetpack Compose

I have ViewModel with Kotlin sealed class to provide different states for UI. Also, I use androidx.compose.runtime.State object to notify UI about changes in st

Jetpack Compose navigate for result

I'm using the Jetpack Navigation library with the Compose version. I'm setting up navigation like it's shown here I want to be able to navigate from screen A to

What is the simplest way to set the focus order in Jetpack Compose?

I have a column of TextFields, something like: Column { TextField( value = ..., onValueChange = { ... }, keyboardOptions = KeyboardO

How to upgrade an Android project to Java 11

I am using the latest Android Studio Arctic Fox 2020.03.01 Canary 8 and AGP 7, and I want to convert my project to use Java 11. Apparently just doing the follow

How to change the outline color of OutlinedTextField from jetpack compose?

Here is how OutlinedTextField code looks like in jetpack-compose: OutlinedTextField( value = "", onValueChange = {}, label = {Text("Input")} ) The

Jetpack Compose Preview not showing

I seem to be having trouble with Preview in compose, the layout panel doesn't appear when I annotate a compose method with @preview. I assume I'm missing a depe

How to show ellipsis (three dots) at the end of a Text line in Android Jetpack Compose?

Whether I use androidx.compose.foundation.text.BasicText or androidx.compose.material.Text, if there isn't enough space for a text it wraps to the next line, fo

Jetpack Compose Applying PorterDuffMode to Image

Based on the images and PorterDuffModes in this page I downloaded images, initially even though they are png they had light and dark gray rectangles which were

Unable to bring window to foreground with compose desktop

With the following code the application window can be hidden using the button and restored using a global shortcut ALT+S. Now I would like to also use the short

How can I get onTouchEvent in Jetpack Compose?

In normal view, we can have onTouchEvent override fun onTouchEvent(event: MotionEvent?): Boolean { when (event?.action) { MotionEvent.AC