I created to kt files MainActivity.kt and MainPage.kt, I pu my own colors in color.ket and refeerenced them in theme.kt
Omposables in MainActivity.kt get the right colors but MainPage.kt do not
I have a card in MainPage.kt:
Card(
colors = CardDefaults.cardColors(
containerColor = MaterialTheme.colorScheme.onPrimary
),
modifier = Modifier
.clip(cardShape)
.height(200.dp)
.width(cardWidth)
.border(
width = 3.dp,
color = MaterialTheme.colorScheme.secondaryContainer,
shape = cardShape
)
) {
Column(modifier = Modifier.padding(start = 15.dp, top=10.dp)) {
Text(text = "Info Card bottom")
}
}
MaterialTheme.colorScheme.onPrimary (material3) should be greenish, but it gives me light purple.
Any ideas, plesae?
*** I am learning making android app and I probably just dd something wrong.
I deleted the original purple colors in color.kt so I do not know where that color comes from. I also pur dynamicColor to false in theme.kt