requireActivity().onBackPressedDispatcher.addCallback(this,object : OnBackPressedCallback(true){
override fun handleOnBackPressed() {
// 返回要处理的逻辑
}
})
04-10
183
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-08
154
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)