Skip to main content

Questions tagged [android-jetpack-compose]

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.

android-jetpack-compose
5,002 questions with no upvoted or accepted answers
21 votes
0 answers
539 views

Provide sign-in credentials to Play Console "Pre-launch report" for Jetpack Compose view

I can see that 'Play Console' expects "old" android.view.View IDs to be passed in for "username/password resource ID" fields: I'm not able to figure out how to provide resource ID ...
azizbekian's user avatar
  • 61.8k
20 votes
0 answers
2k views

How to get code coverage for Compose UI tests?

I'm now somewhat familiar with UI testing within Jetpack Compose thanks to the extensive Android Documentation, but I can't make Android Studio to run Compose tests with coverage. We are currently ...
Franbede's user avatar
  • 518
19 votes
3 answers
3k views

Is there a 'touch delegate' equivalent in jetpack compose?

An android view can have a touch delegate to increase the clickable area of an element, without increasing it's padding. Is there something like that in jetpack compose? I can't find a modifier that ...
JCraw's user avatar
  • 497
16 votes
0 answers
2k views

Unable to type text in interactive mode in Jetpack Compose

I am trying to type text into a text field in interactive mode and it's not working. But, doing it on a physical device works. MainActivity.kt @Preview(showSystemUi = true) @Composable fun ...
Tayyab Mazhar's user avatar
15 votes
0 answers
430 views

StackOverflowError: stack size 8MB from Accessibility of Compose

Starting from April we have StackOverflowError from compose. We didn't have compose or Kotlin version update. The issue only happens on Android 8. We cannot reproduce locally and according to our logs,...
Sinan Kozak's user avatar
  • 3,366
15 votes
0 answers
2k views

Kotlin Compose Preview reference unresolved

I am working on a Kotlin Multiplatform project for Android and Desktop using Compose and have the Compose Multiplatform IDE Support plugin installed. What I am trying to do is add the @Preview ...
Kira Resari's user avatar
  • 2,145
15 votes
0 answers
860 views

How to avoid prop drilling in Jetpack Compose

I'll try to describe the problem with a short example. Lets assume we have a child composable representing a custom switch, and we want to keep it immutable, so we need to pass the initial state and ...
Mister Smith's user avatar
  • 27.9k
15 votes
1 answer
3k views

How to set half expand ratio to bottom sheet in Compose?

In XML we have material3 bottom sheet. It allows us to set behavior of bottom sheet. It can be updated like: bottomSheetBehavior.halfExpandedRatio = 0.6 bottomSheetBehavior.state = BottomSheetBehavior....
SoulReaver313's user avatar
15 votes
2 answers
957 views

How to scroll screen down automatically when text cursor is out of visible area in android jetpack compose

In Android View System, when cursor(cursor of EditText view in ScrollView) is out of visible area, Android automatically scroll screen to down to make cursor always visible. Is there way to achieve ...
박찬준's user avatar
  • 458
15 votes
0 answers
870 views

SwipeToDismiss & nestedScroll does not work well together - Jetpack Compose

I am trying to implement a list of items with the ability to delete items with swipe. I've basically used LazyColumn and SwipeToDismiss composables. With default configuration vertical scrolling of ...
mehmet6parmak's user avatar
15 votes
0 answers
3k views

How to dispatch touch events to parent composables in Jetpack Compose

I can't seem to find much information on touch handling in Compose. In the specific case I'm looking at I have a list like this: @Composable fun MyListComposable(items: List<Item>) { ...
enyciaa's user avatar
  • 2,112
14 votes
0 answers
2k views

ViewDataBinding XML file in Jetpack Compose Preview

I can't preview ViewDataBinding with data in Jetpack Compose version 1.0.5 I managed to use : Xml file without < layout > tags thanks to : https://stackoverflow.com/a/67016873/13170425 ...
Xsims's user avatar
  • 341
14 votes
1 answer
3k views

ComposeView is not attached to window - Jetpack Compose

I was trying to use FlexBox layout with JetpackCompose. I assumed that I can use normal RecyclerView and use ComposeView to render my view. So I started with the documentation and attempted all the ...
Dhaval's user avatar
  • 2,834
14 votes
0 answers
2k views

Make AndroidView propagate touch events to underlying Composable

Having the following layout, is it possible to make Button (or any other views under AndroidView) receive touch events even though the AndroidView overlays the whole screen? I was able to make it work ...
okycelt's user avatar
  • 151
12 votes
0 answers
1k views

Poor performance HorizontalPager Jetpack Compose

My apps performance is pretty good overall, the only part where the FPS drops is when swiping through the HorizontalPager by accompanist. Each Page has a simple LazyVerticalGrid with 3 fixed columns ...
HavanaSun's user avatar
  • 836

15 30 50 per page
1
2 3 4 5
334