I am converting my app to Compose,
class BinDetailDialogFragment //private View pic;
: DialogFragment() {
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return ComposeView(requireContext()).apply {
setContent {
Text(
text = "This is Recipe Fragment",
style = TextStyle(
fontSize = TextUnit.Sp(21)
)
)
}
}
}
}
when I open dialogFragment:
activity?.supportFragmentManager?.let {
BinDetailDialogFragment.newInstance().show(it, BinDetailDialogFragment.TAG)
}
it throws
java.lang.NoSuchMethodError: No virtual method setContent(Lkotlin/jvm/functions/Function0;)V in class Landroidx/compose/ui/platform/ComposeView; or its super classes (declaration of 'androidx.compose.ui.platform.ComposeView' appears in