Manuel Lorenzo
11/25/2020, 12:59 PMKaustubh Patange
11/25/2020, 1:05 PM@Composeable fun compose() {
...
if (!isLoaded) {
ShowProgressBar()
}
...
}
Manuel Lorenzo
11/25/2020, 1:06 PM@Composable
fun RemotiCircularProgressIndicator(
modifier: Modifier = Modifier,
isLoading: Boolean = true,
setIsLoading: (Boolean) -> Unit = {}
) {
if (isLoading) {
CircularProgressIndicator(
modifier.then(
Modifier
.fillMaxHeight(0.25f)
.fillMaxWidth(0.25f)
)
)
}
}
val (isLoading, setIsLoading) = remember { mutableStateOf(viewState.loading) }
RemotiCircularProgressIndicator(
modifier = Modifier.align(Alignment.CenterHorizontally),
isLoading = isLoading,
setIsLoading = setIsLoading,
)
ppvi
11/25/2020, 1:22 PMLiveData.observeAsState()
for exampleManuel Lorenzo
11/25/2020, 1:25 PMppvi
11/25/2020, 1:26 PMManuel Lorenzo
11/25/2020, 1:47 PMColton Idle
11/25/2020, 8:43 PM