Questions tagged [jetpack-compose-modifier]

4 questions
4
votes
1 answer

How on earth do you reason about order of Jetpack Compose modifiers?

I get that Jetpack Compose operates from the outside in for modifiers, but what about this one? What I asked for: 8 dp padding then 2 dp border then background colour for component then 16 dp padding @Composable fun App() { …
Hakanai
  • 12,010
  • 10
  • 62
  • 132
2
votes
1 answer

How to give a Box a CircleShaped stroke?

So this is how i ended up giving my jetpack Compose box a rounded circle shape Box(modifier = Modifier .size(32.dp) .clip(CircleShape) .border(BorderStroke(2.dp, Color.Red), CircleShape) ){ } As you can see , CircleShape is…
0
votes
0 answers

Conflict on using ParentDataModifiers together

I have a composable function like this: Column( modifier = Modifier.fillMaxSize() ) { Button( modifier = Modifier .wrapContentWidth() .align(Alignment.End), onClick =…
0
votes
0 answers

detectTransformGestures detecting a second gesture (with zoom = 1f) after every gesture (when refactored to custom modifier)

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 (callback) is detecting a second gesture after…