Ian Warwick
01/09/2020, 2:55 PMColor
for Green shows up as Red in @Preview
and in emulator? apologies if this is a known issueChuck Jazdzewski [G]
01/09/2020, 6:52 PM@Preview
function? Preview does not use the `Activity`'s onCreate
.Ian Warwick
01/09/2020, 6:53 PM@Composable
@Preview
fun WrongColor() {
val color = Color(0f, 255f, 0f)
Surface(color = color) {
Container(width = 100.dp, height = 100.dp) {
Text("Hello")
}
}
}
Chuck Jazdzewski [G]
01/09/2020, 7:16 PMIan Warwick
01/09/2020, 7:16 PMmatvei
01/10/2020, 4:31 PMf
s from color components or substitute 255f with 1f, this might help