Jetpack Compose is Android’s modern toolkit for building native declarative UI made by Google. If you're targeting desktop with Compose for Desktop, use both this and [compose-desktop] tags.
Questions tagged [android-jetpack-compose]
10142 questions
5
votes
2 answers
Display markdown content in Jetpack compose
Currently there's no jetpack compose library for showing md content.
# Header
## H2
` code `
```dsd```
...
How can I make a composable function that can display markdown content?

Mahdi-Malv
- 16,677
- 10
- 70
- 117
5
votes
0 answers
How does Alignment and Arrangement work in Jetpack Compose's Row and Column?
I want to set the SpaceBetween property to the Alignment of Row, but it seems has no options to match my need.
Row(horizontalArrangement = Alignment.SpaceBetween)

ccd
- 5,788
- 10
- 46
- 96
5
votes
0 answers
How to see JetpackCompose kotlin source in Android Studio (4.2)?
When I command-click into the JetpackCompose function, all I see is below (as per Android Studio 4.2)
I click Download Sources, but nothing happens. I click Decompile to Java, it's relative cryptic code to understand the Java version of it. How…

Elye
- 53,639
- 54
- 212
- 474
5
votes
2 answers
Jetpack Compose App doesn't launch on AVD
I've written a sample using Jetpack Compose then whenever i try to Install it on an AVD, gradle builds the Project Successfully but the Built App doesn't launch. Everything About the Tools and Codes is ok, even Preview shows UI fine, if i Build APK…

mohammad jahangiry
- 133
- 5
5
votes
2 answers
The Jetpack Compose project doesn't build after I add an anonymous class to it
I'm trying to add Jetpack Compose to my project, but after making all changes to my build.gradle file I'm not able to build it. And the reason is having anonymous classes in the project.
Instead of describing my project, build.gradle file and all…

Vasyl Glodan
- 556
- 1
- 6
- 22
5
votes
2 answers
Jetpack compose (Alpha 1.0.0) for production release
We have app in play store and being used by lot of customers. We are planning to redesign our existing app using Android Jetpack Compose. Is it allowed to publish to Play Store? if not, when we can expect it?
In general do you advice to jump into…

MathankumarK
- 2,717
- 1
- 17
- 34
5
votes
2 answers
Why Jetpack Compose Preview shows nothing?
I'm using Jetpack Compose and the Preview show just the title:
But if i use the dev13 version it works fine.
IDE: Android Studio 4.2 Canary 7
Compose: 0.1.0-dev17

Creepy Ghoul
- 53
- 6
5
votes
2 answers
Get and set position of element programmatically in Jetpack Compose
Is it possible to get and set position/bounds programmatically of element on window? Let's say, we have simple Text and want to move it 50dp on y axis.
Text(text = "Hello", modifier = Modifier.padding(8.dp).fillMaxWidth())

Adrian Grygutis
- 470
- 1
- 8
- 18
5
votes
2 answers
How should a composable higher order function be referenced with Jetpack Compose?
I'm using Jetpack Compose version 0.1.0-dev13
I've written a simple composable function which uses an AdapterList with a list of items. (Note: this works as intended when using a lambda instead of a reference using the :: syntax)
AdapterList(data =…

notquiteamonad
- 1,159
- 2
- 12
- 28
5
votes
1 answer
Jetpack Compose Text Show Confuse
if code like this:
Text(
"Text with background",
Modifier.drawBackground(Color.Magenta, RectangleShape).padding(10.dp)
)
Text(
"Text with background",
Modifier.padding(10.dp).drawBackground(Color.Magenta,…

leiiiooo
- 83
- 1
- 5
5
votes
2 answers
Android Jetpack Compose AdapterList crashing
I am using AdapterList in Android Jetpack Compose. In list I have clickable component.
When I start scrolling without untouch and go out of that AdapterList, It's crashing. It might be library issue.
Thanks in Advance.
I am using...
//Jetpack…

Madhav Gor
- 211
- 2
- 12
5
votes
1 answer
Exception during code generation Jetpack Compose
I just tried to load an image from my resources with val context = ambient(ContextAmbient) but when I try to run the project I get an error during the generation of the code.
java.lang.IllegalStateException: Backend Internal error: Exception…
5
votes
1 answer
How to use Retrofit's suspend functions with AS 4.0 and compose enabled?
I'm working on an experimental project where I'm using jetpack compose in Android Studio 4.0 and Retrofit's coroutine support.
Here is my top-level gradle.build:
buildscript {
ext.kotlin_version = "1.3.61"
ext.compose_version =…

Semanticer
- 1,962
- 1
- 18
- 29
5
votes
1 answer
Methods to set content view in Jetpack Compose UI
I had three question
There is setViewContent which accept composable function as input parameter similar to
setContent. So, what is a difference between setViewContent and setContent and its use-cases. You can able to see setViewContent in…

amar_1995
- 575
- 3
- 14
5
votes
2 answers
Can't find where the preview window is in Android Studio 4.0(Canary)
I'm going through the tutorials about Jetpack which is ran in the Android Studio 4.0(Canary), please refer to the link post below.
https://developer.android.com/jetpack/compose/tutorial
Everything is ready except I can't find the preview window…

Wayne Lee
- 53
- 3