Nat Strangerweather
12/12/2020, 9:11 AMjaqxues
12/12/2020, 9:16 AMNat Strangerweather
12/12/2020, 9:17 AMjaqxues
12/12/2020, 9:19 AMNat Strangerweather
12/12/2020, 9:21 AMNat Strangerweather
12/12/2020, 9:21 AMArchie
12/12/2020, 10:09 AMNat Strangerweather
12/12/2020, 10:10 AMArchie
12/12/2020, 10:14 AM@Composable
fun Parent() {
var color by remember { mutableStateOf(myColor) }
...
Child(color)
}
@Composable
fun Child(color: Color) {
...
}
should work...jaqxues
12/12/2020, 10:16 AMby
, it implicitly calls the getValue delegate which will cause recomposition of the entire parentjaqxues
12/12/2020, 10:17 AMArchie
12/12/2020, 10:19 AMNat Strangerweather
12/12/2020, 10:26 AMNat Strangerweather
12/12/2020, 12:13 PMNat Strangerweather
12/12/2020, 12:13 PMbodyContent = {
ScrollableColumn(horizontalAlignment = CenterHorizontally) {
Spacer(modifier = Modifier.height(20.dp))
Text(text = "Quick Settings")
Spacer(modifier = Modifier.height(20.dp))
QuickOptions(context)
Spacer(modifier = Modifier.height(40.dp))
Text(text = "Sound Options")
Spacer(modifier = Modifier.height(20.dp))
SoundOptions()
Spacer(modifier = Modifier.height(30.dp))
}
},
Archie
12/12/2020, 12:23 PMNat Strangerweather
12/12/2020, 6:15 PMArchie
12/16/2020, 1:26 PMindex
is coming from. Determining where the index
is coming from would help you know what you should convert into a State<T>
.