onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return ComposeView(requireContext()).apply {
setContent {
rootView()
}
}
}
@Preview
@Composable
private fun rootView(){
MaterialTheme {
Column(
modifier = Modifier.fillMaxWidth().fillMaxHeight(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
CircularProgressIndicator()
}
}
}
1460743: Fix memory leaks in AndroidComposeView. | https://android-review.googlesource.com/c/platform/frameworks/support/+/1460743
Обсуждают сегодня