Tin Tran
@Composable @Preview fun Test() { var showLoading by remember { mutableStateOf(true) } Box( modifier = Modifier.fillMaxSize().background(Color.White) ) { Button(onClick = {showLoading = !showLoading}) { Text(text = "Show loading") } if (showLoading) { Box(modifier = Modifier.fillMaxSize().background(Color(0x33000000))) { CircularProgressIndicator( color = Color.White, strokeWidth = 2.dp, modifier = Modifier .align(Alignment.Center) ) } } } }
Albert Chang
Surface
Box
Modifier.pointerInput(Unit) { detectTapGestures { } }
A modern programming language that makes developers happier.