我有一个扩展了ComponentActivity的Activity(用于基于Compose实现的Activity变体),因此无法访问FragmentManager。
是否有办法在其中显示使用View System实现的DialogFragment?
class MyActivity : ComponentActivity(){
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
//how to show DialogFragment here? there is no access to FragmentManager
ScreenContent()
}
}
}