본문 바로가기
Android

Android Compose Card backgroundColor Change

by kkong93 2023. 6. 12.
반응형
Card(
    onClick = {},
    colors = CardDefaults.cardColors(
        containerColor = MaterialTheme.colorScheme.surfaceVariant,
    ),
    modifier = Modifier.fillMaxWidth()
)

containerColor 옵션을 사용해서 카드뷰의 배경색상을 변경해줄 수 있다.

 

 

 

 

 

 

출처 : 

https://stackoverflow.com/questions/73100231/how-to-set-background-color-for-material3-card-in-android-compose

 

How to set Background Color for Material3 Card in Android Compose?

I try to set the background color for the Material3 Card in Android Jetpack Compose, using the backgroundColor parameter. implementation 'androidx.compose.material3:material3:1.0.0-alpha14' // * Card

stackoverflow.com

 

 

How to set Background Color for Material3 Card in Android Compose?

I try to set the background color for the Material3 Card in Android Jetpack Compose, using the backgroundColor parameter. implementation 'androidx.compose.material3:material3:1.0.0-alpha14' // * Card

stackoverflow.com

 

반응형

댓글