Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
-1 votes
2 answers
129 views

I mean a Drawable generated dynamically, not a file from res/drawable. I tried setting it as a background of the modifier, but it doesn't accept a Drawable instance object. In Java, it was done like ...
NullPointerException's user avatar
2 votes
2 answers
99 views

How can I align horizontally a particular children in a LazyColumn? it worked perfectly using Column, but it doesn't work in LazyColumn because I can't import Modifier.align for each particular item ...
NullPointerException's user avatar
0 votes
0 answers
131 views

I created a TabLayout on one screen in Jetpack compose and created two pages.I created a TabLayout on one screen in Jetpack compose and created two pages, but there is a problem: even if the content ...
NewPartizal's user avatar
  • 1,298
0 votes
1 answer
895 views

The documentation provides a sample of the swipeable modifier. However, the sample defines anchors with hardcoded values. @OptIn(ExperimentalMaterialApi::class) @Composable private fun SwipeableSample(...
Hawklike's user avatar
  • 1,240
7 votes
2 answers
3k views

I started migrate our code to Compose and have problem with @Preview. For example, when I use modifier.fillMaxWidth() without default param "fraction = 1f" I have render problem java.lang....
Ihor's user avatar
  • 71
1 vote
1 answer
201 views

I have the below code LazyColumn( contentPadding = PaddingValues(all = 64.dp), verticalArrangement = Arrangement.spacedBy(16.dp), ) { item { Box( ...
Elye's user avatar
  • 61.3k
0 votes
1 answer
163 views

I have a composable function: @Composable fun GapText( modifier: Modifier, text: String, ) { Row(modifier = modifier) { Text(text = text) ... } } Now I want to create ...
Saman Sattari's user avatar
0 votes
0 answers
116 views

I'm trying to refactor my code for a pinch/zoom functionality into a custom modifier. However, when I move the code to a custom modifier, the PointerInputScope.detectTransformGestures onGesture lambda ...
VIN's user avatar
  • 7,054
2 votes
2 answers
4k views

I want to catch event when user clicks outside of ModalBottomSheetLayout. I wrapped ModalBottomSheetLayout with Box which is full size of the screen and set click listener. But Click listener only ...
Rainmaker's user avatar
  • 11.2k
1 vote
1 answer
2k views

A "genius" designer wants a screen with 2 app-bars and different scroll behaviors. The top one should appear only when user scrolls till the begin of the screen, the second one should appear ...
Michael Abyzov's user avatar
1 vote
2 answers
496 views

I am unable to get the expected results as shown in the picture below. There are 2 rules to follow The horizontal line should not continue till the bottom text. Instead, it should just be the height ...
Navjot's user avatar
  • 1,304
2 votes
1 answer
776 views

@Composable fun Sample(){ val startPadding = 10.dp Column { Text( text = "sample text", modifier = Modifier .paddingFromBaseline(top = ...
Kun.tito's user avatar
  • 485
2 votes
0 answers
801 views

How to create a lint warning like this? Lint Warning I am clear on Why this warning is shown and how to fix it. I am interested in understanding how this lint warning is created and is there a way to ...
Abhimanyu's user avatar
  • 15.2k
1 vote
1 answer
2k views

I'm trying to design a modifier that can be used in composable where if you click, it'll automatically log something. e.g. Modifier.logClick = then(Modifier.clickable{ //log }) The problem here is ...
Yao's user avatar
  • 709
0 votes
1 answer
71 views

I created an interactive line, but that might be irrelevant. Even if there was no interaction, this renders unexpected results:- @Composable fun PowerClock() { var dynamicAngle by remember { ...
Richard Onslow Roper's user avatar
3 votes
3 answers
4k views

This question has been asked before, but in different forms, regarding some specific use cases, and so far there has been no answer. I finally got it working, so I am sharing this here, but this ...
Richard Onslow Roper's user avatar