What is the correct way of disabling screen intera...
# compose
r
What is the correct way of disabling screen interaction when
CircularProgressIndicator
is materialized on screen.
Copy code
Box(
    modifier = Modifier.fillMaxSize(),
    showLoading:Boolean,     
  ) {
    LazyColumn { // displaycontent
      
    } 
    if(showLoading){ // disable background screen interaction
       CircularProgressIndicator()
    }
  }
d
I would wrap CircularProgressIndicator into Box:
Copy code
Box(
    modifier = modifier
        .fillMaxSize()   
        .clickable(
            interactionSource = remember { MutableInteractionSource() },
            indication = rememberRipple(bounded = false),
            onClick = { }
        ),
    contentAlignment = Alignment.Center
) {
    CircularProgressIndicator()
}
🙏 2