Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Jetpack Compose release version: Both stable 1.0.1 and latest 1.2.0-alpha02
Android Studio Build: 2021.1.1 Patch 1
Kotlin version: 1.5.21
Take example from this documentation
Appending my simple example here where you can add via plus button more "blues" and see ow they dont show up after second row.
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
RedrawBugTheme {
// A surface container using the 'background' color from the theme
Surface(color = MaterialTheme.colors.background) {
Screen()
}
}
}
}
}
@Composable
fun Screen() {
var blueCount by remember { mutableStateOf(1) }
Column {
Row(Modifier.height(IntrinsicSize.Min)) {
Column(Modifier.weight(1f)) { Text("Red ".repeat(10)) }
Divider(
color = Color.Black,
modifier = Modifier
.fillMaxHeight()
.width(5.dp)
)
Column(Modifier.weight(1f)) { Text("Blue ".repeat(blueCount)) }
}
Spacer(modifier = Modifier.height(100.dp))
Row {
IconButton(onClick = { ++blueCount }, content = { Icon(Icons.Default.Add, contentDescription = null) })
IconButton(onClick = { --blueCount }, content = { Icon(Icons.Default.Clear, contentDescription = null) })
}
}
}
Description
Rename of modifier