我的问题类似于FullScreenDialogFragmentinAndroid,但这个问题并不能完全解决我的问题。我有一个DialogFragment,我想为其设置最大尺寸,并在DialogFragment超出显示范围时自动调整大小。这似乎应该融入操作系统,但我能想到的唯一解决方案是轮询显示尺寸并在尺寸超出显示范围时手动调整大小。在DialogFragment的onCreateView(LayoutInflaterinflater,ViewGroupcontainer,BundlesavedInstanceState)中://Displaythefirstscreenm_rootVi