Questions tagged [android-compose-card]

24 questions
1
vote
1 answer

Android Compose: Force Collapse All Expanded Cards except currently selected

I am currently working on a list of expandable cards. I would like to close all other opened expandable cards except the currently selected. The data I am working with is a Map, however i don't know how to get reference to the list…
ahmad
  • 2,149
  • 4
  • 21
  • 38
1
vote
0 answers

Android Compose: Modifier vs other arguments - What's the meaning of the Modifier-object?

A code snippet from a Compose-course, which I'm currently doing: Card( modifier = Modifier .width(200.dp) .height(390.dp) .padding(12.dp), shape = RoundedCornerShape(corner =…
mewi
  • 539
  • 1
  • 4
  • 11
1
vote
1 answer

Card VS Box render Difference

Is there an explanation for why this Card( modifier = Modifier .background( brush = Brush.horizontalGradient( colors = listOf( OrgFarmTheme.colors.secondary, …
0
votes
1 answer

Pin the 5th item of the column or lazyColumn on top of the screen while scrolling the column using android jetpack compose

I am new in android jetpack compose i created a list view using lazyColumn that is working fine but my use case is to pin the 5th or Xth element to the top of the screen while other elements will scroll.
0
votes
2 answers

How do you change card colors on material3 android when pressed?

How to set Background Color for Material3 Card in Android Compose? Piggy backing fro this question. The answers tells how to set a background color. When material3 card is pressed, it changes color with a ripple effect. But how can I change the…
0
votes
1 answer

Card element with shadow only on the bottom

I am trying to create Card element and to add shadow only on bottom part with a little bit in left and right and zero on the top. Card( elevation = 10.dp, modifier = Modifier .background(color = seatfrogWhite, shape =…
0
votes
2 answers

How to change the border color of a card, on card click in Jetpack Compose?

I have list of users that is displayed in a lazy row. Each row is represented by a card. Each card has a red border. How can I change the border of the card from red to black, on card click? Here is what I have tried: LazyRow( modifier =…
0
votes
1 answer

Jetpack compose state management, unable to change background color of Card

Using Jetpack Compose state management, I want to change background of Card in scrollable list, when user clicks on AlertDialog As shown in below code, I have stored state as cardState with remember When user is clicking on AlertDialog positive…
0
votes
1 answer

Making three Card on Jetpack Compose, but only two are shown

I try to build three different class cards. But why only two is shown? Code: Scaffold(....){ innerPadding -> BodyContent(Modifier.padding(innerPadding).fillMaxWidth()) Card(shape = MaterialTheme.shapes.medium, modifier =…
1
2